From af6769675acbbfd780fa2ece8587502d6d579372 Mon Sep 17 00:00:00 2001 From: Rajesh Joseph Date: Tue, 13 Dec 2016 15:28:42 +0530 Subject: socket: socket disconnect should wait for poller thread exit When SSL is enabled or if "transport.socket.own-thread" option is set then socket_poller is run as different thread. Currently during disconnect or PARENT_DOWN scenario we don't wait for this thread to terminate. PARENT_DOWN will disconnect the socket layer and cleanup resources used by socket_poller. Therefore before disconnect we should wait for poller thread to exit. Change-Id: I71f984b47d260ffd979102f180a99a0bed29f0d6 BUG: 1404181 Signed-off-by: Rajesh Joseph Reviewed-on: http://review.gluster.org/16141 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Kaushal M Reviewed-by: Raghavendra Talur Reviewed-by: Raghavendra G --- rpc/rpc-lib/src/rpc-transport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rpc/rpc-lib/src/rpc-transport.h') diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h index 4e7a8c46fae..717c40af13a 100644 --- a/rpc/rpc-lib/src/rpc-transport.h +++ b/rpc/rpc-lib/src/rpc-transport.h @@ -224,7 +224,7 @@ struct rpc_transport_ops { rpc_transport_reply_t *reply); int32_t (*connect) (rpc_transport_t *this, int port); int32_t (*listen) (rpc_transport_t *this); - int32_t (*disconnect) (rpc_transport_t *this); + int32_t (*disconnect) (rpc_transport_t *this, gf_boolean_t wait); int32_t (*get_peername) (rpc_transport_t *this, char *hostname, int hostlen); int32_t (*get_peeraddr) (rpc_transport_t *this, char *peeraddr, @@ -248,7 +248,7 @@ int32_t rpc_transport_connect (rpc_transport_t *this, int port); int32_t -rpc_transport_disconnect (rpc_transport_t *this); +rpc_transport_disconnect (rpc_transport_t *this, gf_boolean_t wait); int32_t rpc_transport_destroy (rpc_transport_t *this); -- cgit