activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r814639 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Mon, 14 Sep 2009 13:43:54 GMT
Author: rajdavies
Date: Mon Sep 14 13:43:54 2009
New Revision: 814639

URL: http://svn.apache.org/viewvc?rev=814639&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-2385

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=814639&r1=814638&r2=814639&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
Mon Sep 14 13:43:54 2009
@@ -762,7 +762,15 @@
                     }
                 }
             }
-            long reconnectAttempts = firstConnection ? this.startupMaxReconnectAttempts :
this.maxReconnectAttempts;
+            int reconnectAttempts = 0;
+            if (firstConnection) {
+                if (this.startupMaxReconnectAttempts != 0) {
+                    reconnectAttempts = this.startupMaxReconnectAttempts;
+                }
+            }
+            if (reconnectAttempts==0) {
+                reconnectAttempts = this.maxReconnectAttempts;
+            }            
             if (reconnectAttempts > 0 && ++connectFailures >= reconnectAttempts)
{
                 LOG.error("Failed to connect to transport after: " + connectFailures + "
attempt(s)");
                 connectionFailure = failure;



Mime
View raw message