Correct fix for removal of first read timeout, we are always using soTimeout, both...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:02:21 +0000 (09:02 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 May 2007 09:02:21 +0000 (09:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@540073 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11NioProcessor.java
java/org/apache/coyote/http11/Http11NioProtocol.java
java/org/apache/tomcat/util/net/NioEndpoint.java

index a2b91d6..d5e2811 100644 (file)
@@ -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;
index 8294c21..f8f4f95 100644 (file)
@@ -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();
     }
index cca2c44..dfa74a4 100644 (file)
@@ -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.