summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorVikas Gorur <vikas@gluster.com>2009-04-17 06:15:16 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-17 20:43:14 +0530
commit7867577b346c7f003be67ad202f4085cf35fdf7c (patch)
treebd7da1cac9dc2a3154adf1aae6e48648a90f7488 /xlators/protocol
parent7b1beca0a3b60a8b9347a3122d77aea081ccb773 (diff)
Destroy old ping timer before setting new one.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-protocol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c
index 3a11ef03882..09ce62730b1 100644
--- a/xlators/protocol/client/src/client-protocol.c
+++ b/xlators/protocol/client/src/client-protocol.c
@@ -482,7 +482,11 @@ client_start_ping (void *data)
}
timeout.tv_sec = conn->ping_timeout;
timeout.tv_usec = 0;
-
+
+ if (conn->ping_timer)
+ gf_timer_call_cancel (trans->xl->ctx,
+ conn->ping_timer);
+
conn->ping_timer =
gf_timer_call_after (trans->xl->ctx, timeout,
client_ping_timer_expired,