summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-01-23 17:37:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-01-26 03:46:55 -0800
commit1ee3cc05cdff1b34dae466e1218fb2505899ddeb (patch)
tree420065481a968f4baf0e9e6cf0e517eb4419a6b5 /xlators/protocol/client
parent5e1fdc783072337ab37876bfbbd4f3b2f56e6d7e (diff)
protocol/client: timeout tweaks
* option frame-timeout 0 now means no frame timeout * option ping-timeout 0 now means no ping timeout * extended frame-timeout range from 0 to 1 day * extended ping-timeout range from 1 Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 450 (frame-timeout range should be higher) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=450 BUG: 423 (Disable protocol timeout) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=423
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-protocol.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c
index 64c3456a1..91eb6df64 100644
--- a/xlators/protocol/client/src/client-protocol.c
+++ b/xlators/protocol/client/src/client-protocol.c
@@ -339,7 +339,7 @@ save_frame (transport_t *trans, call_frame_t *frame,
saved_frames_put (conn->saved_frames, frame, op, type, callid);
- if (conn->timer == NULL) {
+ if (conn->timer == NULL && conn->frame_timeout) {
timeout.tv_sec = 10;
timeout.tv_usec = 0;
conn->timer = gf_timer_call_after (trans->xl->ctx, timeout,
@@ -440,6 +440,9 @@ client_start_ping (void *data)
conf = this->private;
conn = trans->xl_private;
+ if (!conn->ping_timeout)
+ return;
+
pthread_mutex_lock (&conn->lock);
{
if ((conn->saved_frames->count == 0) ||
@@ -7128,12 +7131,12 @@ struct volume_options options[] = {
},
{ .key = {"frame-timeout"},
.type = GF_OPTION_TYPE_TIME,
- .min = 5,
- .max = 1013,
+ .min = 0,
+ .max = 86400,
},
{ .key = {"ping-timeout"},
.type = GF_OPTION_TYPE_TIME,
- .min = 5,
+ .min = 1,
.max = 1013,
},
{ .key = {NULL} },