Collapse the multiple if statements
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jul 2011 21:18:11 +0000 (21:18 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 7 Jul 2011 21:18:11 +0000 (21:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1144046 13f79535-47bb-0310-9956-ffa450edef68

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

index 31b6f47..a4b7012 100644 (file)
@@ -191,16 +191,13 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
         try {
             rp.setStage(org.apache.coyote.Constants.STAGE_SERVICE);
             error = !adapter.asyncDispatch(request, response, status);
-            if ( !error ) {
-                if (attach != null) {
-                    if (asyncStateMachine.isAsyncDispatching()) {
-                        //reset the timeout
-                        if (keepAlive && keepAliveTimeout>0) {
-                            attach.setTimeout(keepAliveTimeout);
-                        } else {
-                            attach.setTimeout(soTimeout);
-                        }
-                    }
+            if (!error && attach != null &&
+                    asyncStateMachine.isAsyncDispatching()) {
+                //reset the timeout
+                if (keepAlive && keepAliveTimeout>0) {
+                    attach.setTimeout(keepAliveTimeout);
+                } else {
+                    attach.setTimeout(soTimeout);
                 }
             }
         } catch (InterruptedIOException e) {