activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1038036 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Tue, 23 Nov 2010 10:20:29 GMT
Author: dejanb
Date: Tue Nov 23 10:20:29 2010
New Revision: 1038036

URL: http://svn.apache.org/viewvc?rev=1038036&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-3049 - failover and initialReconnectDelay

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=1038036&r1=1038035&r2=1038036&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Tue Nov 23 10:20:29 2010
@@ -99,7 +99,7 @@ public class FailoverTransport implement
     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 implement
                 if (connectList.isEmpty()) {
                     failure = new IOException("No uris available to connect to.");
                 } else {
-                    if (!useExponentialBackOff) {
+                    if (!useExponentialBackOff || reconnectDelay == -1) {
                         reconnectDelay = initialReconnectDelay;
                     }
                     synchronized (backupMutex) {



Mime
View raw message