From 8b572cb6b8567cf6c4a6abbfe6b3ff2e5bfb04d6 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Sun, 19 Feb 2006 22:15:43 +0000 Subject: [PATCH] don't iterate forever in oneWay() if disposed (can cause some tests to hang in Connection close) git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378969 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/failover/FailoverTransport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java b/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java index 7a976a6242..27bf7fc302 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java @@ -305,7 +305,7 @@ public class FailoverTransport implements CompositeTransport { synchronized (reconnectMutex) { // Keep trying until the message is sent. - for (int i = 0;; i++) { + for (int i = 0;!disposed; i++) { try { // Wait for transport to be connected.