Commit 18081544 authored by Johnny Lim's avatar Johnny Lim Committed by Andy Wilkinson

Fix registration of shutdown handler as a shutdown hook

Closes gh-4311
parent 04fa7e4d
...@@ -337,7 +337,7 @@ public class LoggingApplicationListener implements GenericApplicationListener { ...@@ -337,7 +337,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
Runnable shutdownHandler = loggingSystem.getShutdownHandler(); Runnable shutdownHandler = loggingSystem.getShutdownHandler();
if (shutdownHandler != null if (shutdownHandler != null
&& shutdownHookRegistered.compareAndSet(false, true)) { && shutdownHookRegistered.compareAndSet(false, true)) {
Runtime.getRuntime().addShutdownHook(new Thread()); Runtime.getRuntime().addShutdownHook(new Thread(shutdownHandler));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment