summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2018-09-13 15:44:15 +0200
committerRaghavendra G <rgowdapp@redhat.com>2018-09-14 05:37:33 +0000
commit9f49f0b5901e29b8f0761c0e2631cd1c1d969a51 (patch)
treef58148db20fa9e5a7b4b51e4683ee9e117c44c30 /rpc/rpc-transport
parent0b3f08cd50f76af537aa4bce2f09602a4834b0fc (diff)
socket: set 42 as default tpc-user-timeout
The 'tcp-user-timeout' option is define in the 'socket' module, but it's configured in 'protocol/server' and 'protocol/client', which are the parents of the 'socket' module. However, current options management logic only takes into consideration default values specified in the 'socket' module itself, ignoring values defined in the owner xlator. This patch simply sets the default value of tcp-user-timeout in the 'socket' module so that server and client use the expected value. Change-Id: Ib8ad7c4ac6aac725b01a78f8c3d10cf4063d2ee6 fixes: bz#1628605 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index b3f8b7fc580..dd3e1e91992 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -3884,7 +3884,7 @@ reconfigure(rpc_transport_t *this, dict_t *options)
int ret = 0;
uint32_t backlog = 0;
uint64_t windowsize = 0;
- uint32_t timeout = 0;
+ uint32_t timeout = 42;
int keepaliveidle = GF_KEEPALIVE_TIME;
int keepaliveintvl = GF_KEEPALIVE_INTERVAL;
int keepalivecnt = GF_KEEPALIVE_COUNT;
@@ -4349,7 +4349,7 @@ socket_init(rpc_transport_t *this)
gf_boolean_t tmp_bool = 0;
uint64_t windowsize = GF_DEFAULT_SOCKET_WINDOW_SIZE;
char *optstr = NULL;
- uint32_t timeout = 0;
+ uint32_t timeout = 42;
int keepaliveidle = GF_KEEPALIVE_TIME;
int keepaliveintvl = GF_KEEPALIVE_INTERVAL;
int keepalivecnt = GF_KEEPALIVE_COUNT;
@@ -4617,7 +4617,7 @@ struct volume_options options[] = {
{.key = {"transport.tcp-user-timeout"},
.type = GF_OPTION_TYPE_INT,
.op_version = {GD_OP_VERSION_3_10_2},
- .default_value = "0"},
+ .default_value = "42"},
{.key = {"transport.socket.nodelay"},
.type = GF_OPTION_TYPE_BOOL,
.default_value = "1"},