From dev-return-191528-archive-asf-public=cust-asf.ponee.io@tomcat.apache.org Tue Jun 19 21:30:44 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EB46B180634 for ; Tue, 19 Jun 2018 21:30:43 +0200 (CEST) Received: (qmail 45758 invoked by uid 500); 19 Jun 2018 19:30:42 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 45748 invoked by uid 99); 19 Jun 2018 19:30:42 -0000 Received: from mail-relay.apache.org (HELO mailrelay2-lw-us.apache.org) (207.244.88.137) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2018 19:30:42 +0000 Received: from [192.168.23.12] (host81-156-40-47.range81-156.btcentralplus.com [81.156.40.47]) by mailrelay2-lw-us.apache.org (ASF Mail Server at mailrelay2-lw-us.apache.org) with ESMTPSA id BDF95A39 for ; Tue, 19 Jun 2018 19:30:41 +0000 (UTC) Subject: Re: svn commit: r1833871 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java From: Mark Thomas To: dev@tomcat.apache.org Reply-To: Tomcat Developers List References: <20180619192717.F2F613A01C4@svn01-us-west.apache.org> Message-ID: <2abd2085-f911-5039-9db1-9e2d724b18e1@apache.org> Date: Tue, 19 Jun 2018 20:30:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180619192717.F2F613A01C4@svn01-us-west.apache.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit On 19/06/18 20:27, markt@apache.org wrote: > Author: markt > Date: Tue Jun 19 19:27:17 2018 > New Revision: 1833871 > > URL: http://svn.apache.org/viewvc?rev=1833871&view=rev > Log: (empty) Sorry. This isn't quite finished and I hit commit by mistake. I'm trying to align the various close methods a little more. I'll clean this up when I'm done. Mark > > Modified: > tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java > tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java > > Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1833871&r1=1833870&r2=1833871&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue Jun 19 19:27:17 2018 > @@ -842,7 +842,7 @@ public class Nio2Endpoint extends Abstra > > @Override > public boolean isClosed() { > - return !getSocket().isOpen(); > + return closed || !getSocket().isOpen(); > } > > > > Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1833871&r1=1833870&r2=1833871&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) > +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Jun 19 19:27:17 2018 > @@ -997,6 +997,7 @@ public class NioEndpoint extends Abstrac > private volatile SendfileData sendfileData = null; > private volatile long lastRead = System.currentTimeMillis(); > private volatile long lastWrite = lastRead; > + private volatile boolean closed = false; > > public NioSocketWrapper(NioChannel channel, NioEndpoint endpoint) { > super(channel, endpoint); > @@ -1132,13 +1133,14 @@ public class NioEndpoint extends Abstrac > > @Override > public void close() throws IOException { > + closed = true; > getSocket().close(); > } > > > @Override > public boolean isClosed() { > - return !getSocket().isOpen(); > + return closed || !getSocket().isOpen(); > } > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org