From b23046d5f7c958e8f38e86de12979d75c97c401a Mon Sep 17 00:00:00 2001 From: jbertram Date: Thu, 3 Mar 2016 12:41:12 -0600 Subject: [PATCH] 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. --- .../activemq/artemis/core/client/impl/ServerLocatorImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java index 22a2e0ef26..53ba9df862 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java @@ -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); }