Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 87618 invoked from network); 11 Jun 2008 23:23:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 23:23:03 -0000 Received: (qmail 12708 invoked by uid 500); 11 Jun 2008 23:23:05 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 12682 invoked by uid 500); 11 Jun 2008 23:23:05 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 12673 invoked by uid 99); 11 Jun 2008 23:23:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 16:23:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 23:22:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5A1F02388A41; Wed, 11 Jun 2008 16:22:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r666893 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java Date: Wed, 11 Jun 2008 23:22:12 -0000 To: commits@activemq.apache.org From: rajdavies@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080611232212.5A1F02388A41@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajdavies Date: Wed Jun 11 16:22:12 2008 New Revision: 666893 URL: http://svn.apache.org/viewvc?rev=666893&view=rev Log: Fix for https://issues.apache.org/activemq/browse/AMQ-1771 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=666893&r1=666892&r2=666893&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 Wed Jun 11 16:22:12 2008 @@ -529,11 +529,17 @@ } public void reconnect() { - LOG.debug("Waking up reconnect task"); - try { - reconnectTask.wakeup(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); + synchronized (reconnectMutex) { + if (started) { + LOG.debug("Waking up reconnect task"); + try { + reconnectTask.wakeup(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } else { + LOG.debug("Reconnect was triggered but transport is not started yet. Wait for start to connect the transport."); + } } }