diff --git a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java index cea97d5861..1d6a7c2087 100755 --- a/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java +++ b/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java @@ -247,15 +247,15 @@ public class ActiveMQEndpointWorker { public void stop() throws InterruptedException { synchronized (shutdownMutex) { if (!running) - return; - running = false; + return; + running = false; LOG.info("Stopping"); // wake up pausing reconnect attempt shutdownMutex.notifyAll(); - serverSessionPool.close(); + serverSessionPool.close(); + } disconnect(); } - } private boolean isRunning() { return running;