Move the shutting down of the reconnectTask outside the reconnectMutex. The shutdown task may block indefinitely, while waiting for some other threads to finish iterating through the task. If the iterating thread needs to obtain the reconnectMutex (i.e. in doConnect), it won't be able to, since the shutdown task is still holding on to the lock causing a deadlock.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@379717 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adrian T. Co 2006-02-22 07:13:27 +00:00
parent 97f35c40ec
commit 83ab261e69
1 changed files with 3 additions and 3 deletions

View File

@ -283,8 +283,6 @@ public class FanoutTransport implements CompositeTransport {
started = false;
disposed = true;
reconnectTask.shutdown();
for (Iterator iter = transports.iterator(); iter.hasNext();) {
FanoutTransportHandler th = (FanoutTransportHandler) iter.next();
if( th.transport != null ) {
@ -295,6 +293,8 @@ public class FanoutTransport implements CompositeTransport {
log.debug("Stopped: "+this);
ss.throwFirstException();
}
reconnectTask.shutdown();
}
public long getInitialReconnectDelay() {