From 1e80929b9f530196a2582ecc1f1d0e89a7351c35 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 17 Oct 2012 18:01:34 +0000 Subject: [PATCH] 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. --- jbsockets.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) { -- 2.49.0