From d6b865ef3243798487f0036da282317af58aea1f Mon Sep 17 00:00:00 2001 From: moagrawa Date: Tue, 16 May 2017 07:32:57 +0530 Subject: [PATCH 453/473] socket: Avoid flooding of error message in case of SSL Problem: socket poller is throwing Input/Output messages during volume operation Solution: Update the code in socket_connect function before call socket_spwan. > BUG: 1450559 > Change-Id: I5f275fe7a4b730b16d7b0a0407e76288b07ceaef > Signed-off-by: Mohit Agrawal > Reviewed-on: https://review.gluster.org/17280 > NetBSD-regression: NetBSD Build System > Smoke: Gluster Build System > Reviewed-by: Zhou Zhengping > CentOS-regression: Gluster Build System > Reviewed-by: Jeff Darcy > (cherry picked from commit 710cd0ae8f2dd0495ab483df050720b5c862688d) BUG: 1427958 Change-Id: Id8def150e2108043dc475856e47e9c560fc14975 Signed-off-by: moagrawa Reviewed-on: https://code.engineering.redhat.com/gerrit/106256 Reviewed-by: Atin Mukherjee --- rpc/rpc-transport/socket/src/socket.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 07cf7a6..ffb56dd 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3282,7 +3282,16 @@ handler: rpc_transport_ref (this); refd = _gf_true; - if (priv->own_thread && !(priv->connect_failed)) { + if (priv->own_thread) { + if (priv->connect_failed) { + gf_msg_debug (this->name, 0, + "socket connect is failed so close it"); + sys_close (priv->sock); + priv->sock = -1; + ret = -1; + goto unlock; + } + if (pipe(priv->pipe) < 0) { gf_log(this->name,GF_LOG_ERROR, "could not create pipe"); -- 1.8.3.1