From: markt Date: Sun, 5 Sep 2010 19:49:53 +0000 (+0000) Subject: Make sure async timeout thread is stopped when the connector is stopped. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=6f3c88e18d042e7f862663aa92841f6442e90002;p=tomcat7.0 Make sure async timeout thread is stopped when the connector is stopped. Correct copy and pasted comment Also fix @Override warning for the method git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992882 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/JIoEndpoint.java b/java/org/apache/tomcat/util/net/JIoEndpoint.java index 813b93399..d14f2c428 100644 --- a/java/org/apache/tomcat/util/net/JIoEndpoint.java +++ b/java/org/apache/tomcat/util/net/JIoEndpoint.java @@ -128,9 +128,10 @@ public class JIoEndpoint extends AbstractEndpoint { */ protected class AsyncTimeout implements Runnable { /** - * The background thread that listens for incoming TCP/IP connections and - * hands them off to an appropriate processor. + * The background thread that checks async requests and fires the + * timeout if there has been no activity. */ + @Override public void run() { // Loop until we receive a shutdown command @@ -152,7 +153,7 @@ public class JIoEndpoint extends AbstractEndpoint { } // Loop if endpoint is paused - while (paused) { + while (paused && running) { try { Thread.sleep(1000); } catch (InterruptedException e) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index b1c959691..1c075d4eb 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -139,6 +139,10 @@ Make sure acceptor threads are stopped when the connector is stopped. (markt) + + Make sure async timeout thread is stopped when the connector is stopped. + (markt) +