apply the right exit condition
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 14 Apr 2007 14:39:22 +0000 (14:39 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 14 Apr 2007 14:39:22 +0000 (14:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@528816 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11NioProcessor.java

index b4624d9..f9212a9 100644 (file)
@@ -950,12 +950,14 @@ public class Http11NioProcessor implements ActionHook {
 
 
             rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
-            //we're at a keep alive stage,
-            openSocket = true;
-            //Add the socket to the poller
-            socket.getPoller().add(socket);
-            //free up the thread
-            break;
+            if (!error && keepAlive && !comet) {
+                //we're at a keep alive stage,
+                openSocket = true;
+                //Add the socket to the poller
+                socket.getPoller().add(socket);
+                //free up the thread
+                break;
+            }
         }
 
         rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);