From 32db9c5a933d4746b73b5b0b0c1628865bd7b629 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Tue, 23 Nov 2010 10:20:29 +0000 Subject: [PATCH] https://issues.apache.org/activemq/browse/AMQ-3049 - failover and initialReconnectDelay git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1038036 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/transport/failover/FailoverTransport.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 8f176a758e..f8fff877fd 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 @@ -99,7 +99,7 @@ public class FailoverTransport implements CompositeTransport { private int maxReconnectAttempts; private int startupMaxReconnectAttempts; private int connectFailures; - private long reconnectDelay = this.initialReconnectDelay; + private long reconnectDelay = -1; private Exception connectionFailure; private boolean firstConnection = true; // optionally always have a backup created @@ -805,7 +805,7 @@ public class FailoverTransport implements CompositeTransport { if (connectList.isEmpty()) { failure = new IOException("No uris available to connect to."); } else { - if (!useExponentialBackOff) { + if (!useExponentialBackOff || reconnectDelay == -1) { reconnectDelay = initialReconnectDelay; } synchronized (backupMutex) {