Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DB166D199 for ; Thu, 16 May 2013 23:32:53 +0000 (UTC) Received: (qmail 38091 invoked by uid 500); 16 May 2013 23:32:54 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 38013 invoked by uid 500); 16 May 2013 23:32:54 -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 38002 invoked by uid 99); 16 May 2013 23:32:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 23:32:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Thu, 16 May 2013 23:32:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id EF96423888D2; Thu, 16 May 2013 23:32:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1483605 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java Date: Thu, 16 May 2013 23:32:31 -0000 To: commits@activemq.apache.org From: gtully@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130516233231.EF96423888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gtully Date: Thu May 16 23:32:31 2013 New Revision: 1483605 URL: http://svn.apache.org/r1483605 Log: https://issues.apache.org/jira/browse/AMQ-4540 - wait for a max of 30 seconds for pending forwards to complete Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java?rev=1483605&r1=1483604&r2=1483605&view=diff ============================================================================== --- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java (original) +++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/network/DemandSubscription.java Thu May 16 23:32:31 2013 @@ -18,6 +18,7 @@ package org.apache.activemq.network; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -101,13 +102,13 @@ public class DemandSubscription { if (dispatched.get() > 0) { synchronized (activeWaiter) { try { - activeWaiter.wait(); + activeWaiter.wait(TimeUnit.SECONDS.toMillis(30)); } catch (InterruptedException ignored) { } } if (this.dispatched.get() > 0) { LOG.warn("demand sub interrupted or timedout while waiting for outstanding responses, " + - "expect potentially " + this.dispatched.get() + " duplicate deliveried"); + "expect potentially " + this.dispatched.get() + " duplicate forwards"); } } }