fixed/improved logging
[rxpd] / src / rxpd_connection.c
index 4d5df03..c6cc816 100644 (file)
@@ -67,7 +67,14 @@ rxpd_connection_cleanup (void* ptr)
   llist_unlink (&self->node);
   close (self->fd);
   self->fd = -1;
-  rxpd_log (NULL, LOG_DEBUG, "connection canceled\n");
+
+  char buf[512];
+  *buf = '\0';
+  if (self->socket->rxpd_socket_addr (self, buf, "", 511))
+    {
+      rxpd_log (NULL, LOG_DEBUG, "connection %s terminated\n", buf);
+    }
+
   rxpd_connection_delete (self);
 }