ARTEMIS-385 clean-up factory on timeout

This restores a call to ClientSessionFactory#cleanup that appears to have been
mistakenly removed by a previous change related to this JIRA.
This commit is contained in:
jbertram 2016-03-03 12:41:12 -06:00
parent d7d494e8f1
commit b23046d5f7
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);
}