Permalink
Browse files

rpc-transport/socket: Set NODELAY for connect socket

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>
  • Loading branch information...
1 parent cbb7a20 commit 857ba84a236bcfb665aa930976106d990e96db77 @vbellur vbellur committed Apr 19, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 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);

0 comments on commit 857ba84

Please sign in to comment.