From e6753927338a12175f3a87fd4349d41847b8d2aa Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sun, 18 Mar 2012 13:49:07 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/2967 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- rpc/rpc-lib/src/rpc-clnt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rpc/rpc-lib/src') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 01a1c24e7..5867c322b 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) { -- cgit