Patchwork [BUG:1956] socket: Reduce keepalive idle and interval time

login
register
Submitter Vijay Bellur
Date 2010-10-27 11:06:32
Message ID <20101027110632.GA31779@dev.gluster.com>
Download mbox | patch
Permalink /patch/5584/
State Accepted
Headers show

Comments

Vijay Bellur - 2010-10-27 11:06:32
Signed-off-by: Vijay Bellur <vijay@gluster.com>
---
 rpc/rpc-transport/socket/src/socket.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 00b7dd5..bf82504 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -2582,7 +2582,8 @@  socket_init (rpc_transport_t *this)
 
         /* Enable Keep-alive by default. */
         priv->keepalive = 1;
-        priv->keepaliveintvl = GF_USE_DEFAULT_KEEPALIVE;
+        priv->keepaliveintvl = 2;
+        priv->keepaliveidle = 20;
         if (dict_get_str (this->options, "transport.socket.keepalive",
                           &optstr) == 0) {
                 if (gf_string2boolean (optstr, &tmp_bool) == -1) {