From 3ed3dfc7a1710c959c9fdeb4400e0cee3e1fd68f Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Sat, 2 Mar 2013 10:12:24 +1100 Subject: [PATCH] 402048 org.eclipse.jetty.server.ShutdownMonitor doesn't stop after the jetty server is stopped --- .../main/java/org/eclipse/jetty/server/ShutdownMonitor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java b/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java index 3edf45b3760..405ce12f6fa 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/ShutdownMonitor.java @@ -157,7 +157,7 @@ public class ShutdownMonitor extends Thread return; } - while (true) + while (serverSocket != null) { Socket socket = null; try @@ -190,7 +190,9 @@ public class ShutdownMonitor extends Thread // Shutdown Monitor debug("Shutting down monitor"); close(socket); + socket = null; close(serverSocket); + serverSocket = null; if (exitVm) {