Author: aco
Date: Tue Feb 21 23:13:27 2006
New Revision: 379717
URL: http://svn.apache.org/viewcvs?rev=379717&view=rev
Log:
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.
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL:
http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?rev=379717&r1=379716&r2=379717&view=diff
==============================================================================
---
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
(original)
+++
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Tue Feb 21 23:13:27 2006
@@ -282,9 +282,7 @@
return;
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 @@
log.debug("Stopped: "+this);
ss.throwFirstException();
}
+
+ reconnectTask.shutdown();
}
public long getInitialReconnectDelay() {