You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/09/06 20:39:41 UTC

svn commit: r1165777 - /tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java

Author: markt
Date: Tue Sep  6 18:39:41 2011
New Revision: 1165777

URL: http://svn.apache.org/viewvc?rev=1165777&view=rev
Log:
Fix timeouts broken by refactoring

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=1165777&r1=1165776&r2=1165777&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue Sep  6 18:39:41 2011
@@ -420,16 +420,16 @@ public class Http11NioProcessor extends 
         // open
         openSocket = true;
         // Check to see if we have read any of the request line yet
-        if (inputBuffer.getParsingRequestLinePhase()<2) {
-            // No data read, OK to recycle the processor
-            // Continue to use keep alive timeout
-            if (keepAliveTimeout>0) {
-                socket.setTimeout(keepAliveTimeout);
-            }
+        if (inputBuffer.getParsingRequestLinePhase() < 2) {
+            // Haven't read the request line. Must be keep-alive
+            // Make sure poller uses keepAlive from here onwards
+            socket.setTimeout(endpoint.getKeepAliveTimeout());
         } else {
             // Started to read request line. Need to keep processor
             // associated with socket
             readComplete = false;
+            // Make sure poller uses soTimeout from here onwards
+            socket.setTimeout(endpoint.getSoTimeout());
         }
         if (endpoint.isPaused()) {
             // 503 - Service unavailable



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