summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorMohammed Junaid <junaid@redhat.com>2012-03-28 06:31:56 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-28 02:59:34 -0700
commitb8c4da2ce0326d5c1a3303d4c3931e60b40e9bdc (patch)
treed46b7bc8081f68b0da05d574b375dad082d51aee /xlators/protocol
parentaf0eb165f624c6a76e84e5a0c78881715ceae7c3 (diff)
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 <junaid@redhat.com> Reviewed-on: http://review.gluster.com/3020 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 0f55ca86e4f..45d473fdbe7 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,