summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index e34d2ca47ac..71afa4bda66 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -478,6 +478,10 @@ rpc_clnt_reconnect_cleanup (rpc_clnt_connection_t *conn)
{
if (conn->reconnect) {
+ /* setting disabled = 1 helps to stop rearming of the
+ * reconnection timer and unref the rpc_clnt_t object
+ */
+ clnt->disabled = 1;
ret = gf_timer_call_cancel (clnt->ctx, conn->reconnect);
if (!ret) {
reconnect_unref = _gf_true;