SteamWar/SpigotCore
Archiviert
13
0

Merge pull request 'Finaler Rettungsstuss (+10 ATK gegen untote Server)' (#210) from suicide into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #210
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Lixfel 2022-09-14 12:22:58 +02:00
Commit 5b3cfefaaf

Datei anzeigen

@ -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);
}