Finaler Rettungsstuss (+10 ATK gegen untote Server) #210
@ -54,8 +54,12 @@ public class CrashDetector {
|
||||
if(mainThread.isAlive()) {
|
||||
SWException.log("Server hung for " + (curTime - lastTick.get()) + "ms", Arrays.stream(mainThread.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n")));
|
||||
} else {
|
||||
SWException.log("Server thread already dead, stopping server", "");
|
||||
System.exit(0);
|
||||
SWException.log("Server thread already dead, unclean server stop", "Core enabled: " + Core.getInstance().isEnabled());
|
||||
if(Core.getInstance().isEnabled()) {
|
||||
Core.getInstance().onDisable();
|
||||
}
|
||||
//System.exit(0); Does freeze, potential freezing issues: ConsoleRestoreHook, ApplicationShutdownHooks or DeleteOnExitHook
|
||||
Runtime.getRuntime().halt(0);
|
||||
}
|
||||
lastTick.set(curTime);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren