Fix race condition in ClientImpl
@@ -2330,12 +2330,12 @@ class ClientImpl extends TcpDiscoveryImpl {
Collection<ClusterNode> nodes = updateTopologyHistory(topVer, msg);
- notifyDiscovery(EVT_NODE_JOINED, topVer, locNode, nodes, msg.spanContainer());
-
boolean disconnected = disconnected();
state = CONNECTED;
+ notifyDiscovery(EVT_NODE_JOINED, topVer, locNode, nodes, msg.spanContainer());
+
if (disconnected) {
notifyDiscovery(EVT_CLIENT_NODE_RECONNECTED, topVer, locNode, nodes, null);
