summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-04-12 10:30:24 +0000
committerAnand Avati <avati@gluster.com>2011-04-13 00:38:47 -0700
commitba365f725a91bcd3dcfae1d8311f9f148ce69055 (patch)
tree9179bd2f6bbb0f0d0ce3ba54a7cfe7edaa70c46f /rpc
parentd7cba3b0bb4867e02a5999f830e5315cd7022520 (diff)
remove excessive logs due to log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2346 (Log message enhancements in GlusterFS - phase 1) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 62f22e2..a8d329f 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;
}