From ba365f725a91bcd3dcfae1d8311f9f148ce69055 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 12 Apr 2011 10:30:24 +0000 Subject: remove excessive logs due to log enhancement Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346 --- rpc/rpc-transport/socket/src/socket.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 62f22e20f1c..a8d329f2242 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -279,11 +279,15 @@ __socket_disconnect (rpc_transport_t *this) priv = this->private; if (priv->sock != -1) { - ret = shutdown (priv->sock, SHUT_RDWR); priv->connected = -1; - gf_log (this->name, GF_LOG_INFO, - "shutdown() returned %d. set connection state to -1", - ret); + ret = shutdown (priv->sock, SHUT_RDWR); + if (ret) { + /* its already disconnected.. no need to understand + why it failed to shutdown in normal cases */ + gf_log (this->name, GF_LOG_DEBUG, + "shutdown() returned %d. %s", + ret, strerror (errno)); + } } out: @@ -1482,9 +1486,11 @@ __socket_proto_state_machine (rpc_transport_t *this, &priv->incoming.pending_count, NULL); if (ret == -1) { - gf_log (this->name, GF_LOG_WARNING, - "reading from socket failed. Error (%s), " - "peer (%s)", strerror (errno), + gf_log (this->name, + ((priv->connected == 1) ? + GF_LOG_WARNING : GF_LOG_DEBUG), + "reading from socket failed. Error (%s)" + ", peer (%s)", strerror (errno), this->peerinfo.identifier); goto out; } -- cgit