tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r1103633 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
Date Mon, 16 May 2011 15:24:42 GMT
-1 for this change. 0 means infinite (no timeout)

http://download.oracle.com/javase/6/docs/api/java/net/Socket.html#setSoTimeout%28int%29

Filip

On 5/16/2011 1:31 AM, markt@apache.org wrote:
> Author: markt
> Date: Mon May 16 07:31:23 2011
> New Revision: 1103633
>
> URL: http://svn.apache.org/viewvc?rev=1103633&view=rev
> Log:
> Prevent infinite loop when readTimeout = 0
>
> Modified:
>      tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
>
> Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=1103633&r1=1103632&r2=1103633&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java (original)
> +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Mon May 16
07:31:23 2011
> @@ -178,7 +178,7 @@ public class NioBlockingSelector {
>                       keycount = 1;
>                       att.resetReadLatch();
>                   }
> -                if (readTimeout>  0&&  (keycount == 0))
> +                if (readTimeout>= 0&&  (keycount == 0))
>                       timedout = (System.currentTimeMillis() - time)>= readTimeout;
>               } //while
>               if (timedout)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1321 / Virus Database: 1500/3640 - Release Date: 05/15/11
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message