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;
|
return;
|
||||||
}
|
}
|
||||||
SystemLogger.logInfo("[SystemShutdownHook] Terminating...");
|
SystemLogger.logInfo("[SystemShutdownHook] Terminating...");
|
||||||
SystemManager.getTerminator().terminate();
|
SystemManager.flag(SystemState.TERMINATED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,8 @@ object Server {
|
|||||||
it.flush()
|
it.flush()
|
||||||
it.close()
|
it.close()
|
||||||
}
|
}
|
||||||
exitProcess(0)
|
if(!SystemManager.isTerminated())
|
||||||
|
exitProcess(0)
|
||||||
}
|
}
|
||||||
delay(625)
|
delay(625)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user