From b8c4da2ce0326d5c1a3303d4c3931e60b40e9bdc Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Wed, 28 Mar 2012 06:31:56 +0530 Subject: protocol/client: Set grace_timer_needed flag to false on a disconnect. A grace timer is registered on a disconnect, but a reconnect timer sends a connect request after every 3sec and if the server is down, the client protocol receives disconnect and a grace timer will be registered which on timeout will increase the lk-version value. Its enough to register the grace timer once after the first disconnect and later just ignore other psuedo disconnects until the next successful reconnect. Change-Id: I7f34a98a79fdc25370ef15a6712bfa316a9b7c7c BUG: 807271 Signed-off-by: Mohammed Junaid Reviewed-on: http://review.gluster.com/3020 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/protocol/client/src/client.c') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 0f55ca86e..45d473fdb 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -134,6 +134,9 @@ client_register_grace_timer (xlator_t *this, clnt_conf_t *conf) } else { gf_log (this->name, GF_LOG_INFO, "Registering a grace timer"); + + conf->grace_timer_needed = _gf_false; + conf->grace_timer = gf_timer_call_after (this->ctx, conf->grace_tv, -- cgit