Align while loop test
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 5 Sep 2011 17:25:31 +0000 (17:25 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 5 Sep 2011 17:25:31 +0000 (17:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1165368 13f79535-47bb-0310-9956-ffa450edef68

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

index 718a125..1e28147 100644 (file)
@@ -195,7 +195,8 @@ public class Http11AprProcessor extends AbstractHttp11Processor<Long> {
 
         long socketRef = socketWrapper.getSocket().longValue();
 
-        while (!error && keepAlive && !comet && !isAsync() && !endpoint.isPaused()) {
+        while (!error && keepAlive && !comet && !isAsync() &&
+                !endpoint.isPaused()) {
 
             // Parsing the request header
             try {
index 2f5af31..74d3016 100644 (file)
@@ -222,7 +222,9 @@ public class Http11NioProcessor extends AbstractHttp11Processor<NioChannel> {
 
         boolean keptAlive = false;
         
-        while (!error && keepAlive && !comet && !isAsync() && !endpoint.isPaused()) {
+        while (!error && keepAlive && !comet && !isAsync() &&
+                !endpoint.isPaused()) {
+
             //always default to our soTimeout
             socketWrapper.setTimeout(soTimeout);
             // Parsing the request header
index 34f6aae..55c7eff 100644 (file)
@@ -157,7 +157,8 @@ public class Http11Processor extends AbstractHttp11Processor<Socket> {
 
         boolean keptAlive = socketWrapper.isKeptAlive();
 
-        while (!error && keepAlive && !endpoint.isPaused()) {
+        while (!error && keepAlive && !comet && !isAsync() &&
+                !endpoint.isPaused()) {
 
             // Parsing the request header
             try {
@@ -358,7 +359,7 @@ public class Http11Processor extends AbstractHttp11Processor<Socket> {
     protected boolean breakKeepAliveLoop(SocketWrapper<Socket> socketWrapper) {
         // If we don't have a pipe-lined request allow this thread to be
         // used by another connection
-        if (isAsync() || error || inputBuffer.lastValid == 0) {
+        if (inputBuffer.lastValid == 0) {
             return true;
         }
         return false;