mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
Make sure we don't call exitProcess() if the system is already terminating
This commit is contained in:
parent
77320289b5
commit
7faa0a2c7c
2 changed files with 3 additions and 2 deletions
|
|
@ -14,6 +14,6 @@ public final class SystemShutdownHook implements Runnable {
|
|||
return;
|
||||
}
|
||||
SystemLogger.logInfo("[SystemShutdownHook] Terminating...");
|
||||
SystemManager.getTerminator().terminate();
|
||||
SystemManager.flag(SystemState.TERMINATED);
|
||||
}
|
||||
}
|
||||
|
|
@ -109,7 +109,8 @@ object Server {
|
|||
it.flush()
|
||||
it.close()
|
||||
}
|
||||
exitProcess(0)
|
||||
if(!SystemManager.isTerminated())
|
||||
exitProcess(0)
|
||||
}
|
||||
delay(625)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue