Fix registration of shutdown handler as a shutdown hook

Closes gh-4311
pull/4304/merge
Johnny Lim 9 years ago committed by Andy Wilkinson
parent 04fa7e4d27
commit 180815445c

@ -337,7 +337,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
Runnable shutdownHandler = loggingSystem.getShutdownHandler();
if (shutdownHandler != null
&& shutdownHookRegistered.compareAndSet(false, true)) {
Runtime.getRuntime().addShutdownHook(new Thread());
Runtime.getRuntime().addShutdownHook(new Thread(shutdownHandler));
}
}
}

Loading…
Cancel
Save