mirror of https://github.com/apache/druid.git
prevent unnecessary exception (#4905)
This commit is contained in:
parent
35944d24ae
commit
ef67915d9c
|
@ -305,7 +305,12 @@ public class CliPeon extends GuiceRunnable
|
|||
|
||||
// Explicitly call lifecycle stop, dont rely on shutdown hook.
|
||||
lifecycle.stop();
|
||||
Runtime.getRuntime().removeShutdownHook(hook);
|
||||
try {
|
||||
Runtime.getRuntime().removeShutdownHook(hook);
|
||||
}
|
||||
catch (IllegalStateException e) {
|
||||
log.warn("Cannot remove shutdown hook, already shutting down");
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
log.error(t, "Error when starting up. Failing.");
|
||||
|
|
Loading…
Reference in New Issue