From b6b62a7fa13e2479290ff1784b5f2f1318fae801 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 27 Jul 2012 17:31:10 +0000 Subject: [PATCH] In serve(), log the client socket and its condition before closing it This makes it more obvious that the socket actually gets closed and should help when diagnosing problems like #3464439. --- jcc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jcc.c b/jcc.c index 91173c5c..6757ad26 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.382 2012/07/23 12:42:53 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.383 2012/07/23 12:55:25 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2630,6 +2630,10 @@ static void serve(struct client_state *csp) if (csp->cfd != JB_INVALID_SOCKET) { + log_error(LOG_LEVEL_CONNECT, "Closing client socket %d. " + "Keep-alive: %u, Socket alive: %u. Data available: %u.", + csp->cfd, 0 != (csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE), + socket_is_still_alive(csp->cfd), data_is_available(csp->cfd, 0)); close_socket(csp->cfd); } -- 2.49.0