From: Fabian Keil <fk@fabiankeil.de>
Date: Wed, 17 Oct 2012 18:01:34 +0000 (+0000)
Subject: Downgrade two error messages in drain_and_close_socket() to LOG_LEVEL_CONNECT
X-Git-Tag: v_3_0_20~253
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/static/faq/static/gitweb.js?a=commitdiff_plain;h=1e80929b9f530196a2582ecc1f1d0e89a7351c35;p=privoxy.git

Downgrade two error messages in drain_and_close_socket() to LOG_LEVEL_CONNECT

The errors are expected if the connection is closed on the remote
end after drain_and_close_socket() confirmed that the socket is
still alive, but before it tries to drain it.
---

diff --git a/jbsockets.c b/jbsockets.c
index 97d73356..7df26911 100644
--- a/jbsockets.c
+++ b/jbsockets.c
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.115 2012/10/12 11:17:48 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.116 2012/10/12 11:23:53 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -734,7 +734,7 @@ void drain_and_close_socket(jb_socket fd)
 #endif
       if (0 != shutdown(fd, SHUT_WR))
       {
-         log_error(LOG_LEVEL_ERROR, "Failed to shutdown socket %d %E", fd);
+         log_error(LOG_LEVEL_CONNECT, "Failed to shutdown socket %d: %E", fd);
       }
 #endif
 #define ARBITRARY_DRAIN_LIMIT 10000
@@ -745,7 +745,7 @@ void drain_and_close_socket(jb_socket fd)
          bytes_drained = read_socket(fd, drainage, sizeof(drainage));
          if (bytes_drained < 0)
          {
-            log_error(LOG_LEVEL_ERROR, "Failed to drain socket %d %E", fd);
+            log_error(LOG_LEVEL_CONNECT, "Failed to drain socket %d: %E", fd);
          }
          else if (bytes_drained > 0)
          {