Author: markt
Date: Thu Oct 20 16:31:38 2011
New Revision: 1186894

URL: http://svn.apache.org/viewvc?rev=1186894&view=rev
Log:
When a comet request ends and the socket is being kept alive, prepare
the buffers for the next request.

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1186894&r1=1186893&r2=1186894&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Thu Oct 
20 16:31:38 2011
@@ -157,7 +157,13 @@ public class Http11NioProcessor extends 
         if (error) {
             return SocketState.CLOSED;
         } else if (!comet) {
-            return (keepAlive)?SocketState.OPEN:SocketState.CLOSED;
+            if (keepAlive) {
+                inputBuffer.nextRequest();
+                outputBuffer.nextRequest();
+                return SocketState.OPEN;
+            } else {
+                return SocketState.CLOSED;
+            }
         } else {
             return SocketState.LONG;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to