summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorKinglong Mee <mijinlong@open-fs.com>2018-09-25 03:40:44 -0400
committerAmar Tumballi <amarts@redhat.com>2018-10-10 05:51:57 +0000
commit0f2113cb0c3f9dff028fb45a62ec2d1d82b4cb66 (patch)
tree4c93509652ffacf16fa12dec03a5202ca3a3db3e /rpc
parent2d96ce8faa277809c0c94aca54320483889f577d (diff)
socket: clear return value if error is going to be handled in event thread
Change-Id: Ibce94f282b0aafaa1ca60ab927a469b70595e81f updates: bz#1626313 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 46929ceee32..94b03f913ab 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -3508,6 +3508,7 @@ socket_connect(rpc_transport_t *this, int port)
will result in EPOLLERR, so cleanup is done in
socket_event_handler or socket_poller */
shutdown(priv->sock, SHUT_RDWR);
+ ret = 0;
gf_log(this->name, GF_LOG_TRACE,
"@@@ client shutdown(%d, SHUT_RDWR)", priv->sock);
}
@@ -3555,6 +3556,8 @@ err:
GF_FREE(arg);
GF_ASSERT(0);
}
+
+ ret = 0;
}
return ret;