Make sure acceptor threads are stopped when the connector is stopped.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 19:47:36 +0000 (19:47 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 5 Sep 2010 19:47:36 +0000 (19:47 +0000)
Also fix @Override warnings for the method

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992881 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/AprEndpoint.java
java/org/apache/tomcat/util/net/JIoEndpoint.java
java/org/apache/tomcat/util/net/NioEndpoint.java
webapps/docs/changelog.xml

index 7dcd07b..0ffa4da 100644 (file)
@@ -918,6 +918,7 @@ public class AprEndpoint extends AbstractEndpoint {
          * The background thread that listens for incoming TCP/IP connections and
          * hands them off to an appropriate processor.
          */
+        @Override
         public void run() {
 
             // Loop until we receive a shutdown command
index f406947..813b933 100644 (file)
@@ -173,13 +173,14 @@ public class JIoEndpoint extends AbstractEndpoint {
          * The background thread that listens for incoming TCP/IP connections and
          * hands them off to an appropriate processor.
          */
+        @Override
         public void run() {
 
             // Loop until we receive a shutdown command
             while (running) {
 
                 // Loop if endpoint is paused
-                while (paused) {
+                while (paused && running) {
                     try {
                         Thread.sleep(1000);
                     } catch (InterruptedException e) {
index bb4b47c..adeb61d 100644 (file)
@@ -802,11 +802,12 @@ public class NioEndpoint extends AbstractEndpoint {
          * The background thread that listens for incoming TCP/IP connections and
          * hands them off to an appropriate processor.
          */
+        @Override
         public void run() {
             // Loop until we receive a shutdown command
             while (running) {
                 // Loop if endpoint is paused
-                while (paused) {
+                while (paused && running) {
                     try {
                         Thread.sleep(1000);
                     } catch (InterruptedException e) {
index 3b28785..b1c9596 100644 (file)
         Further work to reduce the code duplication in the HTTP connectors.
         (markt)
       </update>
+      <fix>
+        Make sure acceptor threads are stopped when the connector is stopped.
+        (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">