Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 60982 invoked from network); 22 Feb 2006 07:13:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Feb 2006 07:13:54 -0000 Received: (qmail 12130 invoked by uid 500); 22 Feb 2006 07:13:54 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 12094 invoked by uid 500); 22 Feb 2006 07:13:53 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 12085 invoked by uid 99); 22 Feb 2006 07:13:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 23:13:53 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 21 Feb 2006 23:13:53 -0800 Received: (qmail 60859 invoked by uid 65534); 22 Feb 2006 07:13:32 -0000 Message-ID: <20060222071332.60858.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r379717 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java Date: Wed, 22 Feb 2006 07:13:32 -0000 To: activemq-commits@geronimo.apache.org From: aco@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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() {