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 --- xlators/protocol/client/src/client-handshake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index c28fa5dd7cd..adccd8d4e51 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1558,7 +1558,7 @@ out: if (conf) { /* Need this to connect the same transport on different port */ /* ie, glusterd to glusterfsd */ - rpc_transport_disconnect (conf->rpc->conn.trans); + rpc_transport_disconnect (conf->rpc->conn.trans, _gf_false); } return ret; @@ -1677,7 +1677,7 @@ out: STACK_DESTROY (frame->root); if (ret != 0) - rpc_transport_disconnect (conf->rpc->conn.trans); + rpc_transport_disconnect (conf->rpc->conn.trans, _gf_false); return ret; } -- cgit