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:
parent
d7d494e8f1
commit
b23046d5f7
|
@ -809,6 +809,9 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery
|
||||||
// how the sendSubscription happens.
|
// how the sendSubscription happens.
|
||||||
// in case this ever changes.
|
// in case this ever changes.
|
||||||
if (topology != null && !factory.waitForTopology(callTimeout, TimeUnit.MILLISECONDS)) {
|
if (topology != null && !factory.waitForTopology(callTimeout, TimeUnit.MILLISECONDS)) {
|
||||||
|
if (factory != null) {
|
||||||
|
factory.cleanup();
|
||||||
|
}
|
||||||
throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup);
|
throw ActiveMQClientMessageBundle.BUNDLE.connectionTimedOutOnReceiveTopology(discoveryGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue