diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java b/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java index dbc2b2e649..979d06a8bf 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/TransportStatusDetector.java @@ -112,5 +112,8 @@ public class TransportStatusDetector implements Service,Runnable{ } public void stop() throws Exception{ started.set(false); + if (runner != null) { + runner.join(getSweepInterval() * 5); + } } }