changeset 4739:0ccfb35cce26

7110484: HttpServer.stop() not closing selector Reviewed-by: chegar
author michaelm
date Thu, 10 Nov 2011 15:30:45 +0000
parents 52be75d060f9
children e5d65a583c15
files src/share/classes/sun/net/httpserver/ServerImpl.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/httpserver/ServerImpl.java	Wed Nov 09 15:51:18 2011 +0800
+++ b/src/share/classes/sun/net/httpserver/ServerImpl.java	Thu Nov 10 15:30:45 2011 +0000
@@ -402,10 +402,10 @@
                 } catch (IOException e) {
                     logger.log (Level.FINER, "Dispatcher (4)", e);
                 } catch (Exception e) {
-                    e.printStackTrace();
                     logger.log (Level.FINER, "Dispatcher (7)", e);
                 }
             }
+            try {selector.close(); } catch (Exception e) {}
         }
 
         private void handleException (SelectionKey key, Exception e) {