Merge pull request 'Finaler Rettungsstuss (+10 ATK gegen untote Server)' (#210) from suicide into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #210 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
5b3cfefaaf
@ -54,8 +54,12 @@ public class CrashDetector {
|
|||||||
if(mainThread.isAlive()) {
|
if(mainThread.isAlive()) {
|
||||||
SWException.log("Server hung for " + (curTime - lastTick.get()) + "ms", Arrays.stream(mainThread.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n")));
|
SWException.log("Server hung for " + (curTime - lastTick.get()) + "ms", Arrays.stream(mainThread.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n")));
|
||||||
} else {
|
} else {
|
||||||
SWException.log("Server thread already dead, stopping server", "");
|
SWException.log("Server thread already dead, unclean server stop", "Core enabled: " + Core.getInstance().isEnabled());
|
||||||
System.exit(0);
|
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);
|
lastTick.set(curTime);
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren