From f0b8f1e356d0fb1d58da3f1fac47d2fa0f018987 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 4 Feb 2016 15:59:00 -0500 Subject: [PATCH] ARTEMIS-385 small fix --- .../client/impl/ClientSessionFactoryImpl.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java index 384bced55b..755d93be97 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java @@ -1337,15 +1337,20 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C Pair connectorPair, boolean isLast) { - if (isLast) { - latchFinalTopology.countDown(); + try { + // if it is our connector then set the live id used for failover + if (connectorPair.getA() != null && TransportConfigurationUtil.isSameHost(connectorPair.getA(), connectorConfig)) { + liveNodeID = nodeID; + } + + serverLocator.notifyNodeUp(uniqueEventID, nodeID, backupGroupName, scaleDownGroupName, connectorPair, isLast); + } + finally { + if (isLast) { + latchFinalTopology.countDown(); + } } - // if it is our connector then set the live id used for failover - if (connectorPair.getA() != null && TransportConfigurationUtil.isSameHost(connectorPair.getA(), connectorConfig)) { - liveNodeID = nodeID; - } - serverLocator.notifyNodeUp(uniqueEventID, nodeID, backupGroupName, scaleDownGroupName, connectorPair, isLast); } @Override