SteamWar/SpigotCore
Archiviert
13
0

Improve crash handling
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2022-08-29 09:50:44 +02:00
Ursprung 8457e4cb8f
Commit e5147943d9
2 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -51,7 +51,12 @@ public class CrashDetector {
while (run) { while (run) {
long curTime = System.currentTimeMillis(); long curTime = System.currentTimeMillis();
if(curTime - TIMEOUT > lastTick.get()) { if(curTime - TIMEOUT > lastTick.get()) {
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 {
SWException.log("Server thread already dead, stopping server", "");
System.exit(0);
}
lastTick.set(curTime); lastTick.set(curTime);
} }
try { try {

Datei anzeigen

@ -139,6 +139,7 @@ public class ErrorHandler extends Handler {
startsWith.add("This version of ViaBackwards does not fully support 1.19 servers."); startsWith.add("This version of ViaBackwards does not fully support 1.19 servers.");
startsWith.add("Biome with id"); startsWith.add("Biome with id");
startsWith.add("1.16 and 1.16.1 clients are only partially supported"); startsWith.add("1.16 and 1.16.1 clients are only partially supported");
startsWith.add("Unable to parse CustomName from ");
ignoreStartsWith = Collections.unmodifiableList(startsWith); ignoreStartsWith = Collections.unmodifiableList(startsWith);
List<String> contains = new ArrayList<>(); List<String> contains = new ArrayList<>();