mirror of https://github.com/apache/activemq.git
Fix for a failover transport deadlock that could occur if the transport is stopped at the same time a failure occurs.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@584800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
67e5952dd1
commit
487e694152
|
@ -258,6 +258,7 @@ public class FailoverTransport implements CompositeTransport {
|
|||
}
|
||||
|
||||
public void stop() throws Exception {
|
||||
Transport transportToStop=null;
|
||||
synchronized (reconnectMutex) {
|
||||
LOG.debug("Stopped.");
|
||||
if (!started) {
|
||||
|
@ -267,7 +268,7 @@ public class FailoverTransport implements CompositeTransport {
|
|||
disposed = true;
|
||||
|
||||
if (connectedTransport != null) {
|
||||
connectedTransport.stop();
|
||||
transportToStop = connectedTransport;
|
||||
connectedTransport = null;
|
||||
}
|
||||
reconnectMutex.notifyAll();
|
||||
|
@ -276,6 +277,9 @@ public class FailoverTransport implements CompositeTransport {
|
|||
sleepMutex.notifyAll();
|
||||
}
|
||||
reconnectTask.shutdown();
|
||||
if( transportToStop!=null ) {
|
||||
transportToStop.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public long getInitialReconnectDelay() {
|
||||
|
|
Loading…
Reference in New Issue