summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2016-12-13 15:28:42 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-12-21 20:49:19 -0800
commitaf6769675acbbfd780fa2ece8587502d6d579372 (patch)
treee464f44c08163b9ba84e3d91d1e9d71efd5c04dc /xlators/protocol
parent8b42e1b5688f8600086ecc0e33ac4abf5e7c2772 (diff)
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 <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/16141 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-handshake.c4
-rw-r--r--xlators/protocol/server/src/server.c3
2 files changed, 4 insertions, 3 deletions
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;
}
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index a99c1470276..af3adb36ef2 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -897,7 +897,8 @@ reconfigure (xlator_t *this, dict_t *options)
"unauthorized client, hence "
"terminating the connection %s",
xprt->peerinfo.identifier);
- rpc_transport_disconnect(xprt);
+ rpc_transport_disconnect(xprt,
+ _gf_false);
}
}
}