You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/10/15 16:50:10 UTC
svn commit: r584800 -
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Author: chirino
Date: Mon Oct 15 07:50:09 2007
New Revision: 584800
URL: http://svn.apache.org/viewvc?rev=584800&view=rev
Log:
Fix for a failover transport deadlock that could occur if the transport is stopped at the same time a failure occurs.
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=584800&r1=584799&r2=584800&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 Oct 15 07:50:09 2007
@@ -258,6 +258,7 @@
}
public void stop() throws Exception {
+ Transport transportToStop=null;
synchronized (reconnectMutex) {
LOG.debug("Stopped.");
if (!started) {
@@ -267,7 +268,7 @@
disposed = true;
if (connectedTransport != null) {
- connectedTransport.stop();
+ transportToStop = connectedTransport;
connectedTransport = null;
}
reconnectMutex.notifyAll();
@@ -276,6 +277,9 @@
sleepMutex.notifyAll();
}
reconnectTask.shutdown();
+ if( transportToStop!=null ) {
+ transportToStop.stop();
+ }
}
public long getInitialReconnectDelay() {