summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2019-03-22 10:40:45 +0530
committerRaghavendra G <rgowdapp@redhat.com>2019-04-03 04:12:52 +0000
commitec1b84300fe267dd12c1e42e7e91905db935f1e2 (patch)
treef3fb3d73795381978151985dd8b83aa1b5aab7af /rpc
parent0a827c1da96302661202e46ea43b6e2526a7ac87 (diff)
transport/socket: log shutdown msg occasionally
Change-Id: If3fc0884e7e2f45de2d278b98693b7a473220a5f Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Fixes: bz#1691616
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c4
-rw-r--r--rpc/rpc-transport/socket/src/socket.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index ecd27e0..fe25f73 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -867,8 +867,8 @@ __socket_shutdown(rpc_transport_t *this)
gf_log(this->name, GF_LOG_DEBUG, "shutdown() returned %d. %s", ret,
strerror(errno));
} else {
- gf_log(this->name, GF_LOG_INFO, "intentional socket shutdown(%d)",
- priv->sock);
+ GF_LOG_OCCASIONALLY(priv->shutdown_log_ctr, this->name, GF_LOG_INFO,
+ "intentional socket shutdown(%d)", priv->sock);
}
return ret;
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h
index 897d98d..e7c0090 100644
--- a/rpc/rpc-transport/socket/src/socket.h
+++ b/rpc/rpc-transport/socket/src/socket.h
@@ -220,6 +220,7 @@ typedef struct {
int keepalivecnt;
int timeout;
int log_ctr;
+ int shutdown_log_ctr;
/* ssl_error_required is used only during the SSL connection setup
* phase.
* It holds the error code returned by SSL_get_error() and is used to