Make sure we don't call exitProcess() if the system is already terminating
This commit is contained in:
@@ -14,6 +14,6 @@ public final class SystemShutdownHook implements Runnable {
|
||||
return;
|
||||
}
|
||||
SystemLogger.logInfo("[SystemShutdownHook] Terminating...");
|
||||
SystemManager.getTerminator().terminate();
|
||||
SystemManager.flag(SystemState.TERMINATED);
|
||||
}
|
||||
}
|
||||
@@ -109,6 +109,7 @@ object Server {
|
||||
it.flush()
|
||||
it.close()
|
||||
}
|
||||
if(!SystemManager.isTerminated())
|
||||
exitProcess(0)
|
||||
}
|
||||
delay(625)
|
||||
|
||||
Reference in New Issue
Block a user