ARTEMIS-385 small fix

This commit is contained in:
Clebert Suconic 2016-02-04 15:59:00 -05:00
parent de4e2cfe3a
commit f0b8f1e356
1 changed files with 12 additions and 7 deletions

View File

@ -1337,15 +1337,20 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C
Pair<TransportConfiguration, TransportConfiguration> 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