From 1e33ef01432d60801e698107f3a42b9b9945b002 Mon Sep 17 00:00:00 2001 From: fhanik Date: Mon, 19 Mar 2007 23:35:42 +0000 Subject: [PATCH] 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 --- java/org/apache/tomcat/util/net/NioEndpoint.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.11.0