From: fhanik Date: Mon, 19 Mar 2007 23:35:42 +0000 (+0000) Subject: Make sure the connection always closes, no matter what X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1e33ef01432d60801e698107f3a42b9b9945b002;p=tomcat7.0 Make sure the connection always closes, no matter what git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@520176 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 e56df3fbb..dc7101675 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1294,11 +1294,10 @@ public class NioEndpoint { if (ka != null && ka.getComet()) { //the comet event takes care of clean up processSocket(ka.getChannel(), status, dispatch); - }else { - if (key.isValid()) key.cancel(); - if (key.channel().isOpen()) key.channel().close(); - key.attach(null); } + if (key.isValid()) key.cancel(); + if (key.channel().isOpen()) key.channel().close(); + key.attach(null); } catch (Throwable e) { if ( log.isDebugEnabled() ) log.error("",e); // Ignore