diff --git a/Spigot-Server-Patches/0468-Forced-Watchdog-Crash-support-and-Improve-Async-Shut.patch b/Spigot-Server-Patches/0468-Forced-Watchdog-Crash-support-and-Improve-Async-Shut.patch index 2994e3da8..a34619771 100644 --- a/Spigot-Server-Patches/0468-Forced-Watchdog-Crash-support-and-Improve-Async-Shut.patch +++ b/Spigot-Server-Patches/0468-Forced-Watchdog-Crash-support-and-Improve-Async-Shut.patch @@ -1,4 +1,4 @@ -From f654ac6449eed39bcdfddca723938f7073e24d6d Mon Sep 17 00:00:00 2001 +From 9366f4f3f725418e1e9533904d8eeda8fe4699a3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 12 Apr 2020 15:50:48 -0400 Subject: [PATCH] Forced Watchdog Crash support and Improve Async Shutdown @@ -36,7 +36,7 @@ We have to ensure Thread Death propagates correctly though to stop main complete This is to ensure that if main isn't truely stuck, it's not manipulating state we are trying to save. diff --git a/src/main/java/net/minecraft/server/CrashReport.java b/src/main/java/net/minecraft/server/CrashReport.java -index 3de19c99..c7dc8787 100644 +index 3de19c998b..c7dc8787cc 100644 --- a/src/main/java/net/minecraft/server/CrashReport.java +++ b/src/main/java/net/minecraft/server/CrashReport.java @@ -257,6 +257,7 @@ public class CrashReport { @@ -48,7 +48,7 @@ index 3de19c99..c7dc8787 100644 throwable = throwable.getCause(); } diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 1ef7890d..e62ca054 100644 +index 1ef7890da5..e62ca0543f 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -750,7 +750,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -61,7 +61,7 @@ index 1ef7890d..e62ca054 100644 @Override diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7bfadb35..99bc8da3 100644 +index 7bfadb35d2..f68494b030 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -144,6 +144,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && new File( split[0] ).isFile() ) diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 5bdcdcf9..acc880c7 100644 +index 5bdcdcf9e8..963bd001f4 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -67,12 +67,13 @@ public class WatchdogThread extends Thread @@ -278,7 +278,7 @@ index 5bdcdcf9..acc880c7 100644 long currentTime = monotonicMillis(); - if ( lastTick != 0 && currentTime > lastTick + earlyWarningEvery && !Boolean.getBoolean("disable.watchdog") ) + MinecraftServer server = MinecraftServer.getServer(); -+ if ( !server.isRunning() || (lastTick != 0 && currentTime > lastTick + earlyWarningEvery && !Boolean.getBoolean("disable.watchdog")) ) ++ if (lastTick != 0 && hasStarted && (!server.isRunning() || (currentTime > lastTick + earlyWarningEvery && !Boolean.getBoolean("disable.watchdog")) )) { - boolean isLongTimeout = currentTime > lastTick + timeoutTime; + boolean isLongTimeout = currentTime > lastTick + timeoutTime || (!server.isRunning() && !server.hasStopped() && currentTime > lastTick + 1000); @@ -326,5 +326,5 @@ index 5bdcdcf9..acc880c7 100644 break; } // Paper end -- -2.25.1.windows.1 +2.25.1