summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
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} },