summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/daemon/dlt_daemon_event_handler.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/daemon/dlt_daemon_event_handler.c b/src/daemon/dlt_daemon_event_handler.c
index 9051f07..b0d16dd 100644
--- a/src/daemon/dlt_daemon_event_handler.c
+++ b/src/daemon/dlt_daemon_event_handler.c
@@ -151,9 +151,21 @@ int dlt_daemon_handle_event(DltEventHandler *pEvent,
{
/* epoll reports an error, we need to clean-up the concerned event
*/
- dlt_event_handler_unregister_connection(pEvent,
- daemon_local,
- fd);
+
+ if (type == DLT_CONNECTION_CLIENT_MSG_TCP)
+ {
+ /* To transition to BUFFER state if this is final TCP client connection,
+ * call dedicated function. this function also calls
+ * dlt_event_handler_unregister_connection() inside the function.
+ */
+ dlt_daemon_close_socket(fd, daemon, daemon_local, 0);
+ }
+ else
+ {
+ dlt_event_handler_unregister_connection(pEvent,
+ daemon_local,
+ fd);
+ }
continue;
}