From 6f3c88e18d042e7f862663aa92841f6442e90002 Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 5 Sep 2010 19:49:53 +0000 Subject: [PATCH] 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 --- java/org/apache/tomcat/util/net/JIoEndpoint.java | 7 ++++--- webapps/docs/changelog.xml | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) 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) + -- 2.11.0