jdk/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java
changeset 27779 e269428daa22
parent 27720 aa3983c8fbee
child 29920 f81c14f472ab
--- a/jdk/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java	Mon Dec 01 11:34:44 2014 -0500
+++ b/jdk/src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java	Mon Dec 01 17:20:06 2014 +0000
@@ -206,11 +206,13 @@
         if (timer1Enabled) {
             timer1.cancel();
         }
-        try {
-            dispatcherThread.join();
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            logger.log(Level.FINER, "ServerImpl.stop: ", e);
+        if (dispatcherThread != null) {
+            try {
+                dispatcherThread.join();
+            } catch (InterruptedException e) {
+                Thread.currentThread().interrupt();
+                logger.log(Level.FINER, "ServerImpl.stop: ", e);
+            }
         }
     }