Improve the "timeout on" diagnostic message.
authorEmil Mikulic <emikulic@gmail.com>
Wed, 26 Aug 2009 11:59:09 +0000 (21:59 +1000)
committerEmil Mikulic <emikulic@gmail.com>
Wed, 18 Nov 2009 11:54:51 +0000 (22:54 +1100)
http.c

diff --git a/http.c b/http.c
index 3ec7848..1c40898 100644 (file)
--- a/http.c
+++ b/http.c
@@ -918,7 +918,11 @@ http_fd_set(fd_set *recv_set, fd_set *send_set, int *max_fd,
         /* Time out dead connections. */
         if (idlefor >= idletime)
         {
-            verbosef("timeout on %d", conn->socket);
+            struct sockaddr_in addrin;
+            addrin.sin_addr.s_addr = conn->client;
+            verbosef("http socket timeout from %s (fd %d)",
+                inet_ntoa(addrin.sin_addr),
+                conn->socket);
             conn->state = DONE;
         }