tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1833871 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java NioEndpoint.java
Date Tue, 19 Jun 2018 19:30:40 GMT
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


Mime
View raw message