activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1304057 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Thu, 22 Mar 2012 21:00:18 GMT
Author: tabish
Date: Thu Mar 22 21:00:17 2012
New Revision: 1304057

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

avoid any potential NPE and try again.

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=1304057&r1=1304056&r2=1304057&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
Thu Mar 22 21:00:17 2012
@@ -145,6 +145,9 @@ public class FailoverTransport implement
                     if (priorityBackup && !connectedToPriority) {
                         try {
                             doDelay();
+                            if (reconnectTask == null) {
+                                return true;
+                            }
                             reconnectTask.wakeup();
                         } catch (InterruptedException e) {
                             LOG.debug("Reconnect task has been interrupted.", e);
@@ -154,6 +157,9 @@ public class FailoverTransport implement
                     // build backups on the next iteration
                     buildBackup = true;
                     try {
+                        if (reconnectTask == null) {
+                            return true;
+                        }
                         reconnectTask.wakeup();
                     } catch (InterruptedException e) {
                         LOG.debug("Reconnect task has been interrupted.", e);



Mime
View raw message