mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-22 19:43:11 +00:00
Router: Ensure log gzipper finishes after shutdown signal
This commit is contained in:
2 files changed
+11
-2
No files matched your search
@@ -1713,7 +1713,12 @@ public class Router implements RouterClock.ClockShiftListener {
|
||||
changeState(State.FINAL_SHUTDOWN_3);
|
||||
clearCaches();
|
||||
_log.log(Log.CRIT, "Shutdown(" + exitCode + ") complete" /* , new Exception("Shutdown") */ );
|
||||
boolean waitForGzip = _context.logManager().shouldGzip();
|
||||
try { _context.logManager().shutdown(); } catch (Throwable t) { }
|
||||
if (waitForGzip && !_killVMOnEnd) {
|
||||
// ShutdownHook calls setKillVMOnEnd(false)
|
||||
try { Thread.sleep(2000); } catch (InterruptedException ie) {}
|
||||
}
|
||||
if (ALLOW_DYNAMIC_KEYS) {
|
||||
if (_context.getBooleanProperty(PROP_DYNAMIC_KEYS))
|
||||
killKeys();
|
||||
|
||||
Reference in new issue
Block a user