diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-03-02 11:40:24 +0530 |
---|---|---|
committer | Jeff Darcy <jdarcy@redhat.com> | 2016-03-08 05:53:07 -0800 |
commit | 325e62cc01a836058622d6ca8e534c352f954848 (patch) | |
tree | be94c949ca7958d0a6a486368cbb6f4f5e59adb9 | |
parent | 62047c80f541985bf9caa41336f471d95de3ce1c (diff) |
rpc: Connect back only if rpc is not disabled
This is to fix regression caused by below patch -
http://review.gluster.org/#/c/13456/
As discussed over http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/14284,
patch #13456 caused a regression where in if there are any pending
rpc invocations, we end up accessing freed object. This patch
fixes it by allowing reconnect during rpc submit only if rpc
is not disabled.
Change-Id: I4ef4dd52bd42368bb89129f98bc973e46c6a39f4
BUG: 1295107
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/13592
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 5513b6db046..2ae3bbad370 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1558,7 +1558,7 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog, pthread_mutex_lock (&conn->lock); { - if (conn->connected == 0) { + if (conn->connected == 0 && !rpc->disabled) { ret = rpc_transport_connect (conn->trans, conn->config.remote_port); } |