src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java
changeset 49153 5447851ff0f6
parent 48083 b1c1b4ef4be2
child 49271 7b35d2a59fb3
--- a/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java	Thu Mar 08 10:28:46 2018 -0500
+++ b/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java	Thu Mar 08 11:21:57 2018 +0900
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -395,7 +395,6 @@
                         } else {
                             try {
                                 if (key.isReadable()) {
-                                    boolean closed;
                                     SocketChannel chan = (SocketChannel)key.channel();
                                     HttpConnection conn = (HttpConnection)key.attachment();
 
@@ -437,7 +436,6 @@
         }
 
         public void handle (SocketChannel chan, HttpConnection conn)
-        throws IOException
         {
             try {
                 Exchange t = new Exchange (chan, protocol, conn);
@@ -448,6 +446,9 @@
             } catch (IOException e) {
                 logger.log (Level.TRACE, "Dispatcher (5)", e);
                 closeConnection(conn);
+            } catch (Throwable e) {
+                logger.log (Level.TRACE, "Dispatcher (6)", e);
+                closeConnection(conn);
             }
         }
     }