From: fhanik Date: Mon, 30 Oct 2006 18:07:22 +0000 (+0000) Subject: cancel the keys X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5b95c68bb00e4c3f6cdc2e46eb853a47c11b0280;p=tomcat7.0 cancel the keys git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@469212 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index fc47164de..e834d69b4 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1457,6 +1457,8 @@ public class NioEndpoint { KeyAttachment att = (KeyAttachment)socket.getAttachment(true); try {socket.close();}catch (Exception ignore){} if ( socket.isOpen() ) socket.close(true); + key.cancel(); + key.attach(null); nioChannels.offer(socket); if ( att!=null ) keyCache.offer(att); }catch ( Exception x ) { @@ -1468,6 +1470,8 @@ public class NioEndpoint { KeyAttachment att = (KeyAttachment)socket.getAttachment(true); try {socket.close();}catch (Exception ignore){} if ( socket.isOpen() ) socket.close(true); + key.cancel(); + key.attach(null); nioChannels.offer(socket); if ( att!=null ) keyCache.offer(att); }catch ( Exception x ) {