From 857ba84a236bcfb665aa930976106d990e96db77 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 19 Apr 2012 23:51:15 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/3197 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri --- rpc/rpc-transport/socket/src/socket.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 615f69f1b..0eb02581c 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); -- cgit