tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rémy Maucherat <r...@apache.org>
Subject Re: [tomcat] branch 7.0.x updated: 63814: Do not set server socket timeout with negative values in NIO
Date Tue, 08 Oct 2019 14:11:30 GMT
On Tue, Oct 8, 2019 at 3:35 PM Mark Thomas <markt@apache.org> wrote:

> On 08/10/2019 12:31, remm@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 <remm@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?
>

Yes since this is not NIO2.

Rémy

Mime
View raw message