From 33823416bad516c33b36149bbbb3842d6aa76886 Mon Sep 17 00:00:00 2001 From: fhanik Date: Wed, 10 Dec 2008 22:43:30 +0000 Subject: [PATCH] Make sure we check if the attachment is null git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@725474 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/net/NioEndpoint.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 283abb13f..08b38db28 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -1400,8 +1400,8 @@ public class NioEndpoint { else handler.release((SocketChannel)key.channel()); if (key.isValid()) key.cancel(); if (key.channel().isOpen()) try {key.channel().close();}catch (Exception ignore){} - try {ka.channel.close(true);}catch (Exception ignore){} - ka.reset(); + try {if (ka!=null) ka.channel.close(true);}catch (Exception ignore){} + if (ka!=null) ka.reset(); } catch (Throwable e) { if ( log.isDebugEnabled() ) log.error("",e); // Ignore -- 2.11.0