This closes #410

This commit is contained in:
Clebert Suconic 2016-03-03 17:56:12 -05:00
commit 8cbcc809a4
1 changed files with 3 additions and 0 deletions

View File

@ -809,6 +809,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
// how the sendSubscription happens.
// in case this ever changes.
if (topology != null && !factory.waitForTopology(callTimeout, TimeUnit.MILLISECONDS)) {
if (factory != null) {
factory.cleanup();
}
throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup);
}