Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECD6910359 for ; Tue, 17 Sep 2013 08:50:29 +0000 (UTC) Received: (qmail 29059 invoked by uid 500); 17 Sep 2013 08:50:24 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 28927 invoked by uid 500); 17 Sep 2013 08:50:24 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 28918 invoked by uid 99); 17 Sep 2013 08:50:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 08:50:24 +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; Tue, 17 Sep 2013 08:50:21 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 999272388A4A for ; Tue, 17 Sep 2013 08:50:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1523956 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/AprEndpoint.java Date: Tue, 17 Sep 2013 08:50:00 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130917085000.999272388A4A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Sep 17 08:50:00 2013 New Revision: 1523956 URL: http://svn.apache.org/r1523956 Log: Fix logic where sendfile thread could get stuck in infinite loop on connector stop. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1523955 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1523956&r1=1523955&r2=1523956&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Sep 17 08:50:00 2013 @@ -1858,6 +1858,7 @@ public class AprEndpoint extends Abstrac // in the poller can cause problems try { synchronized (this) { + this.notify(); this.wait(pollTime / 1000); } } catch (InterruptedException e) { @@ -1962,7 +1963,7 @@ public class AprEndpoint extends Abstrac while (sendfileRunning) { // Loop if endpoint is paused - while (paused) { + while (sendfileRunning && paused) { try { Thread.sleep(1000); } catch (InterruptedException e) { @@ -1970,7 +1971,7 @@ public class AprEndpoint extends Abstrac } } // Loop if poller is empty - while (sendfileCount < 1 && addS.size() < 1) { + while (sendfileRunning && sendfileCount < 1 && addS.size() < 1) { // Reset maintain time. maintainTime = 0; try { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org