summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2012-04-19 23:51:15 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-19 12:01:57 -0700
commit857ba84a236bcfb665aa930976106d990e96db77 (patch)
tree54960f86f78c7c8a38db654815aa8b2b6ac1de8d /rpc/rpc-transport/socket/src/socket.c
parentcbb7a20daf7d59681eb21495361236cf68e9cd3b (diff)
rpc-transport/socket: Set NODELAY for connect socketv3.3.0qa36
This is essentially a re-introduction of setting TCP_NODELAY on the connect socket which was erroneously removed as part of commit 2da18b6 Change-Id: Icc3a8faafce0e63a9dde592a48f22b90a72860d1 BUG: 795635 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3197 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.c')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 615f69f..0eb0258 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -2070,6 +2070,16 @@ socket_connect (rpc_transport_t *this, int port)
}
}
+ if (priv->nodelay) {
+ ret = __socket_nodelay (priv->sock);
+
+ if (ret == -1) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "NODELAY on %d failed (%s)",
+ priv->sock, strerror (errno));
+ }
+ }
+
if (!priv->bio) {
ret = __socket_nonblock (priv->sock);