Make sure async timeout thread is stopped when the connector is stopped.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 19:49:53 +0000 (19:49 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 19:49:53 +0000 (19:49 +0000)
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
webapps/docs/changelog.xml

index 813b933..d14f2c4 100644 (file)
@@ -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) {
index b1c9596..1c075d4 100644 (file)
         Make sure acceptor threads are stopped when the connector is stopped.
         (markt)
       </fix>
+      <fix>
+        Make sure async timeout thread is stopped when the connector is stopped.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">