From: Fabian Keil Date: Fri, 27 Jul 2012 17:31:10 +0000 (+0000) Subject: In serve(), log the client socket and its condition before closing it X-Git-Tag: v_3_0_20~298 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/static/@default-cgi@toggle?a=commitdiff_plain;h=b6b62a7fa13e2479290ff1784b5f2f1318fae801;p=privoxy.git 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. --- 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); }