summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-03-18 13:49:07 +0530
committerAnand Avati <avati@redhat.com>2012-03-18 01:40:33 -0700
commite6753927338a12175f3a87fd4349d41847b8d2aa (patch)
tree1dce960428294361d1b9ed81fe3528dfadc60ddf /rpc/rpc-lib
parent7fdd830431614231e0372faaff33359932b9631a (diff)
rpc: cancel reconnect timer in rpc_clnt_disable
When the graph is considered no longer needed, rpc_clnt_disable is called, which disconnects the connection to server but the reconnect timer is not cancelled in that function, so it is reconnecting to the server before the grace-time-period. The locks of the disabled graph are still there on the server which are leading to hangs. Change-Id: I8d37f1296370e37117005137a0a430e636da4d2e BUG: 803209 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2967 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-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 01a1c24e7d7..5867c322bd0 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1628,6 +1628,10 @@ rpc_clnt_disable (struct rpc_clnt *rpc)
conn->timer = NULL;
}
+ if (conn->reconnect) {
+ gf_timer_call_cancel (rpc->ctx, conn->reconnect);
+ conn->reconnect = NULL;
+ }
conn->connected = 0;
if (conn->ping_timer) {