summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-03-31 10:56:10 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-01 13:20:06 +0530
commitdb365c30d07f5faae4197e37148f64e75b54a7ec (patch)
tree5ae79870edcebfabe588bdc91f71910d45f72fa8 /xlators/protocol
parentaa63a122433d51e89148af27dab98cf68846dab4 (diff)
Enable glusterfs client to exit after a configured number of failed connects \ while fetching volume specification file from server
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-protocol.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c
index e7fda9f0eea..55afa11e1e6 100644
--- a/xlators/protocol/client/src/client-protocol.c
+++ b/xlators/protocol/client/src/client-protocol.c
@@ -6228,6 +6228,7 @@ client_protocol_reconnect (void *trans_ptr)
transport_t *trans = NULL;
client_connection_t *conn = NULL;
struct timeval tv = {0, 0};
+ int32_t ret = 0;
trans = trans_ptr;
conn = trans->xl_private;
@@ -6243,7 +6244,7 @@ client_protocol_reconnect (void *trans_ptr)
gf_log (trans->xl->name, GF_LOG_DEBUG,
"attempting reconnect");
- transport_connect (trans);
+ ret = transport_connect (trans);
conn->reconnect =
gf_timer_call_after (trans->xl->ctx, tv,
@@ -6255,6 +6256,10 @@ client_protocol_reconnect (void *trans_ptr)
}
}
pthread_mutex_unlock (&conn->lock);
+
+ if (ret == -1) {
+ default_notify (trans->xl, GF_EVENT_CHILD_DOWN, NULL);
+ }
}
int