From 1627dcc6802d4bb7ff871b7715af690ca3e7e7b0 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 17 Sep 2010 16:30:54 +0000 Subject: [PATCH] Also handle NPEs (seen during testing of new async re-factoring) and ignore them if the endpoint is shutting down. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@998190 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/net/JIoEndpoint.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/java/org/apache/tomcat/util/net/JIoEndpoint.java b/java/org/apache/tomcat/util/net/JIoEndpoint.java index 3726c6a92..8371449f8 100644 --- a/java/org/apache/tomcat/util/net/JIoEndpoint.java +++ b/java/org/apache/tomcat/util/net/JIoEndpoint.java @@ -193,18 +193,20 @@ public class JIoEndpoint extends AbstractEndpoint { // Ignore } } - }catch ( IOException x ) { - if ( running ) log.error(sm.getString("endpoint.accept.fail"), x); + } catch (IOException x) { + if (running) { + log.error(sm.getString("endpoint.accept.fail"), x); + } + } catch (NullPointerException npe) { + if (running) { + log.error(sm.getString("endpoint.accept.fail"), npe); + } } catch (Throwable t) { log.error(sm.getString("endpoint.accept.fail"), t); } - // The processor will recycle itself when it finishes - } - } - } -- 2.11.0