Remove unnecessary throws
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jul 2011 21:22:01 +0000 (21:22 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jul 2011 21:22:01 +0000 (21:22 +0000)
Move timeout lookups to where the timeouts are reset (in preparation for this being in a separate method)

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1144048 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11NioProcessor.java

index a4b7012..e8c7687 100644 (file)
@@ -177,14 +177,8 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
     /**
      * Process pipelined HTTP requests using the specified input and output
      * streams.
-     *
-     * @throws IOException error during an I/O operation
      */
-    public SocketState asyncDispatch(SocketStatus status)
-        throws IOException {
-
-        long soTimeout = endpoint.getSoTimeout();
-        int keepAliveTimeout = endpoint.getKeepAliveTimeout();
+    public SocketState asyncDispatch(SocketStatus status) {
 
         RequestInfo rp = request.getRequestProcessor();
         final NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getAttachment(false);
@@ -193,6 +187,9 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
             error = !adapter.asyncDispatch(request, response, status);
             if (!error && attach != null &&
                     asyncStateMachine.isAsyncDispatching()) {
+                long soTimeout = endpoint.getSoTimeout();
+                int keepAliveTimeout = endpoint.getKeepAliveTimeout();
+
                 //reset the timeout
                 if (keepAlive && keepAliveTimeout>0) {
                     attach.setTimeout(keepAliveTimeout);