summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 264a3120a46..db99484cb81 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1108,6 +1108,11 @@ rpc_clnt_start (struct rpc_clnt *rpc)
conn = &rpc->conn;
+ pthread_mutex_lock (&conn->lock);
+ {
+ rpc->disabled = 0;
+ }
+ pthread_mutex_unlock (&conn->lock);
rpc_clnt_reconnect (conn);
return 0;
@@ -1758,6 +1763,7 @@ rpc_clnt_disconnect (struct rpc_clnt *rpc)
pthread_mutex_lock (&conn->lock);
{
+ rpc->disabled = 1;
if (conn->timer) {
gf_timer_call_cancel (rpc->ctx, conn->timer);
conn->timer = NULL;