From 3b8f7ed4c080dc45da02dc751478863007199c26 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Mon, 20 Apr 2009 08:08:26 +0530 Subject: client_protocol_reconnect - do not send notify of CHILD_DOWN event if errno from transport_connect() was EINPROGRES This bug was racing between a CHILD_UP from poll thread resulting from the event_register() of the new socket called in fuse thread. CHILD_UP would sometimes overtake the CHILD_DOWN for EINPROGRESS. So replicate would receive CHILD_DOWN as the latest event. This resulted in self-heal not happening etc. --- xlators/protocol/client/src/client-protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index 09ce62730..a715e49e9 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -6415,7 +6415,7 @@ client_protocol_reconnect (void *trans_ptr) } pthread_mutex_unlock (&conn->lock); - if (ret == -1) { + if (ret == -1 && errno != EINPROGRESS) { default_notify (trans->xl, GF_EVENT_CHILD_DOWN, NULL); } } -- cgit