SteamWar/SpigotCore
Archiviert
13
0

Finaler Rettungsstuss (+10 ATK gegen untote Server) #210

Zusammengeführt
Lixfel hat 1 Commits von suicide nach master 2022-09-14 12:22:58 +02:00 zusammengeführt

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