From 3fc86eeb54ebe2d3f3ff7caa334b1bbbf7a79ed9 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 7 Jul 2011 21:18:11 +0000 Subject: [PATCH] Collapse the multiple if statements git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1144046 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/coyote/http11/Http11NioProcessor.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index 31b6f472f..a4b70126b 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -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) { -- 2.11.0