From: Fabian Keil Date: Mon, 26 Jun 2017 12:14:25 +0000 (+0000) Subject: Improve 'socket timeout reached' message X-Git-Tag: v_3_0_27~111 X-Git-Url: http://www.privoxy.org/gitweb/%22https:/static/gitweb.js?a=commitdiff_plain;h=7ac4c3d35cba7d2b7e06a1317c0d0c31b46b7781;p=privoxy.git Improve 'socket timeout reached' message Log the timeout that was triggered and downgrade the log level to LOG_LEVEL_CONNECT to reduce the log noise with common debug settings. The timeout isn't necessary the result of an error and usually merely indicates that Privoxy's socket timeout is lower than the relevant timeouts used by client and server. Sponsored by: Robert Klemme --- diff --git a/jcc.c b/jcc.c index 10266726..3bb2801c 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.463 2017/06/26 12:12:55 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.464 2017/06/26 12:13:52 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2116,8 +2116,8 @@ static void handle_established_connection(struct client_state *csp, if (n == 0) { - log_error(LOG_LEVEL_ERROR, - "Didn't receive data in time: %s", http->url); + log_error(LOG_LEVEL_CONNECT, "Socket timeout %d reached: %s", + csp->config->socket_timeout, http->url); if ((byte_count == 0) && (http->ssl == 0)) { send_crunch_response(csp, error_response(csp, "connection-timeout"));