Also handle NPEs (seen during testing of new async re-factoring) and ignore them...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Sep 2010 16:30:54 +0000 (16:30 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Sep 2010 16:30:54 +0000 (16:30 +0000)
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

index 3726c6a..8371449 100644 (file)
@@ -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
-
             }
-
         }
-
     }