On 08/10/2019 12:31, r...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch 7.0.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/7.0.x by this push:
>      new 0a18642  63814: Do not set server socket timeout with negative 
> values in NIO
> 0a18642 is described below
> 
> commit 0a18642108a637b9800042f4202d284da93a9682
> Author: remm <r...@apache.org>
> AuthorDate: Tue Oct 8 13:31:30 2019 +0200
> 
>     63814: Do not set server socket timeout with negative values in NIO
> ---
>  java/org/apache/tomcat/util/net/NioEndpoint.java | 4 +++-
>  webapps/docs/changelog.xml                       | 8 ++++++++
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java 
> b/java/org/apache/tomcat/util/net/NioEndpoint.java
> index 2f25ee4..33a7d18 100644
> --- a/java/org/apache/tomcat/util/net/NioEndpoint.java
> +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
> @@ -474,7 +474,9 @@ public class NioEndpoint extends 
> AbstractEndpoint<NioChannel> {
>          InetSocketAddress addr = (getAddress()!=null?new 
> InetSocketAddress(getAddress(),getPort()):new InetSocketAddress(getPort()));
>          serverSock.socket().bind(addr,getBacklog());
>          serverSock.configureBlocking(true); //mimic APR behavior
> -        
> serverSock.socket().setSoTimeout(getSocketProperties().getSoTimeout());
> +        if (getSocketProperties().getSoTimeout() > 0) {
> +            
> serverSock.socket().setSoTimeout(getSocketProperties().getSoTimeout());
> +        }

Shouldn't this be >= 0 to allow for infinite timeouts?

Mark

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

Reply via email to