activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1359880 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
Date Tue, 10 Jul 2012 20:07:27 GMT
Author: tabish
Date: Tue Jul 10 20:07:27 2012
New Revision: 1359880

URL: http://svn.apache.org/viewvc?rev=1359880&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-3920

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java?rev=1359880&r1=1359879&r2=1359880&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
Tue Jul 10 20:07:27 2012
@@ -17,6 +17,7 @@
 package org.apache.activemq.network.jms;
 
 import java.util.concurrent.atomic.AtomicBoolean;
+
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -24,6 +25,7 @@ import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
+
 import org.apache.activemq.Service;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -96,11 +98,11 @@ public abstract class DestinationBridge 
         int attempt = 0;
         final int maxRetries = jmsConnector.getReconnectionPolicy().getMaxSendRetries();
 
-        while (started.get() && message != null && ++attempt <= maxRetries)
{
+        while (started.get() && message != null && attempt <= maxRetries)
{
 
             try {
 
-                if (attempt > 0) {
+                if (attempt++ > 0) {
                     try {
                         Thread.sleep(jmsConnector.getReconnectionPolicy().getNextDelay(attempt));
                     } catch(InterruptedException e) {



Mime
View raw message