activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r666893 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Wed, 11 Jun 2008 23:22:12 GMT
Author: rajdavies
Date: Wed Jun 11 16:22:12 2008
New Revision: 666893

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

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=666893&r1=666892&r2=666893&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
Wed Jun 11 16:22:12 2008
@@ -529,11 +529,17 @@
     }
 
     public void reconnect() {
-        LOG.debug("Waking up reconnect task");
-        try {
-            reconnectTask.wakeup();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
+        synchronized (reconnectMutex) {
+            if (started) {
+                LOG.debug("Waking up reconnect task");
+                try {
+                    reconnectTask.wakeup();
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                }
+            } else {
+                LOG.debug("Reconnect was triggered but transport is not started yet. Wait
for start to connect the transport.");
+            }
         }
     }
 



Mime
View raw message