summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client/src')
-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 e7fda9f0e..55afa11e1 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