src/server/daemon/sessionhandler.c

changeset 561
e1c92c126557
parent 560
87485c36081b
--- a/src/server/daemon/sessionhandler.c	Fri Sep 20 20:04:35 2024 +0200
+++ b/src/server/daemon/sessionhandler.c	Fri Sep 20 20:30:57 2024 +0200
@@ -635,6 +635,8 @@
     keepalive->expire = keepalive->created + 120; // TODO: config
     ev_watchlist_add(h, keepalive);
     
+    log_ereport(LOG_DEBUG, "trace reqid: %016llx keep_alive add watch", (unsigned long long int)conn->id);
+    
     // wait for input
     ZERO(ioevent, sizeof(Event));
     ioevent->fn = evt_keep_alive_input_event;
@@ -642,6 +644,7 @@
     ioevent->cookie = keepalive;
     if(ev_pollin(h, conn->fd, ioevent) != 0) {
         log_ereport(LOG_DEBUG, "trace reqid: %016llx connection destroyed | keep_alive_enqueue", (unsigned long long int)conn->id);
+        log_ereport(LOG_DEBUG, "trace reqid: %016llx keep_alive free watch", (unsigned long long int)conn->id);
         log_ereport(LOG_FAILURE, "Cannot enqueue connection");
         ev_watchlist_remove(h, keepalive);
         connection_destroy(conn);
@@ -658,6 +661,7 @@
     
     // remove connection from the keep-alive list
     ev_watchlist_remove(h, keepalive);
+    log_ereport(LOG_DEBUG, "trace reqid: %016llx keep_alive free watch", (unsigned long long int)conn->id);
     free(keepalive);
     
     // prepare http io
@@ -686,6 +690,7 @@
     }
     
     log_ereport(LOG_DEBUG, "trace reqid: %016llx keep_alive timeout", (unsigned long long int)conn->id);
+    log_ereport(LOG_DEBUG, "trace reqid: %016llx keep_alive free watch", (unsigned long long int)conn->id);
     connection_destroy(conn);
     free(ioevent);
     free(item);

mercurial