From: markt Date: Tue, 6 Sep 2011 18:39:41 +0000 (+0000) Subject: Fix timeouts broken by refactoring X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2a01961c83c7c0df40c68baecdcc0fd1c0b14442;p=tomcat7.0 Fix timeouts broken by refactoring git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1165777 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index d8fadd9f1..6ad66d400 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -420,16 +420,16 @@ public class Http11NioProcessor extends AbstractHttp11Processor { // 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