From: fhanik Date: Mon, 21 May 2007 09:02:21 +0000 (+0000) Subject: Correct fix for removal of first read timeout, we are always using soTimeout, both... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a7bd975da3f85413a11b6313675679f55f5491ce;p=tomcat7.0 Correct fix for removal of first read timeout, we are always using soTimeout, both for write and for read git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@540073 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index a2b91d681..d5e281112 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -89,13 +89,7 @@ public class Http11NioProcessor implements ActionHook { this.endpoint = endpoint; request = new Request(); - int readTimeout = endpoint.getFirstReadTimeout(); - if (readTimeout == 0) { - readTimeout = 100; - } else if (readTimeout < 0) { - readTimeout = timeout; - //readTimeout = -1; - } + int readTimeout = endpoint.getSoTimeout(); inputBuffer = new InternalNioInputBuffer(request, maxHttpHeaderSize,readTimeout); request.setInputBuffer(inputBuffer); @@ -825,9 +819,6 @@ public class Http11NioProcessor implements ActionHook { long soTimeout = endpoint.getSoTimeout(); int limit = 0; - if (endpoint.getFirstReadTimeout() > 0 || endpoint.getFirstReadTimeout() < -1) { - limit = endpoint.getMaxThreads() / 2; - } boolean keptAlive = false; boolean openSocket = false; diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java b/java/org/apache/coyote/http11/Http11NioProtocol.java index 8294c21ed..f8f4f9555 100644 --- a/java/org/apache/coyote/http11/Http11NioProtocol.java +++ b/java/org/apache/coyote/http11/Http11NioProtocol.java @@ -330,15 +330,6 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration setAttribute("port", "" + port); } - public int getFirstReadTimeout() { - return ep.getFirstReadTimeout(); - } - - public void setFirstReadTimeout( int i ) { - ep.setFirstReadTimeout(i); - setAttribute("firstReadTimeout", "" + i); - } - public InetAddress getAddress() { return ep.getAddress(); } diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index cca2c44b9..dfa74a4ed 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -430,13 +430,6 @@ public class NioEndpoint { public void setSoTimeout(int soTimeout) { socketProperties.setSoTimeout(soTimeout); } /** - * Timeout on first request read before going to the poller, in ms. - */ - protected int firstReadTimeout = 60000; - public int getFirstReadTimeout() { return firstReadTimeout; } - public void setFirstReadTimeout(int firstReadTimeout) { this.firstReadTimeout = firstReadTimeout; } - - /** * The default is true - the created threads will be * in daemon mode. If set to false, the control thread * will not be daemon - and will keep the process alive.