From: markt Date: Mon, 18 Jul 2011 15:10:29 +0000 (+0000) Subject: Only test for timeouts if timeout is greater than zero (aligns with BIO and APR) X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=de80679337e479ef31297ff1a4dd6decb6b8076a;p=tomcat7.0 Only test for timeouts if timeout is greater than zero (aligns with BIO and APR) git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1147921 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 8cd7c06bf..388c8941f 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1339,7 +1339,10 @@ public class NioEndpoint extends AbstractEndpoint { //only timeout sockets that we are waiting for a read from long delta = now - ka.getLastAccess(); long timeout = (ka.getTimeout()==-1)?((long) socketProperties.getSoTimeout()):(ka.getTimeout()); - boolean isTimedout = delta > timeout; + boolean isTimedout = false; + if (timeout > 0) { + isTimedout = delta > timeout; + } if ( close ) { key.interestOps(0); ka.interestOps(0); //avoid duplicate stop calls