summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b844ca9)
Change-Id: I4c43ff1f73639948bcefa4bf3c41cf4a06ff6b95
try {
Thread.sleep(delayMs);
LOGGER.warn("Delayed shutdown forced the application to exit with code {}.", exitCode);
try {
Thread.sleep(delayMs);
LOGGER.warn("Delayed shutdown forced the application to exit with code {}.", exitCode);
+ // Method halt is used instead of System.exit, because running
+ // of shutdown hooks hangs the application in some cases.
+ Runtime.getRuntime().halt(exitCode);
} catch (InterruptedException e) {
e.printStackTrace();
}
} catch (InterruptedException e) {
e.printStackTrace();
}