From 093dd0a9b9b83fd779f20aa5df3624b6bd99fb35 Mon Sep 17 00:00:00 2001 From: searchndstroy Date: Fri, 17 Aug 2018 09:09:08 -0700 Subject: [PATCH] Fix watchdog restarting on short timeout (#1344) --- .../Add-Early-Warning-Feature-to-WatchDog.patch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch index d4ac52185f..ecde91f508 100644 --- a/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index a5ff014e33..332e90f86b 100644 +index a5ff014e3..332e90f86 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ import org.bukkit.configuration.InvalidConfigurationException; @@ -37,7 +37,7 @@ index a5ff014e33..332e90f86b 100644 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0399a48e19..e0546e3dd2 100644 +index 0399a48e1..e0546e3dd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs @@ -49,7 +49,7 @@ index 0399a48e19..e0546e3dd2 100644 long start = System.nanoTime(), lastTick = start - TICK_TIME, catchupTime = 0, curTime, wait, tickSection = start; // Paper - Further improve server tick loop while (this.isRunning) { diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 4f9fd4bc60..2cdd9aaf81 100644 +index 4f9fd4bc6..2cdd9aaf8 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +0,0 @@ public class SpigotConfig @@ -62,7 +62,7 @@ index 4f9fd4bc60..2cdd9aaf81 100644 public static boolean bungee; diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 57a4748a30..28a9e2b96f 100644 +index 57a4748a3..93dc69835 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -0,0 +0,0 @@ import java.lang.management.MonitorInfo; @@ -145,11 +145,12 @@ index 57a4748a30..28a9e2b96f 100644 + log.log( Level.SEVERE, "------------------------------" ); ++ if ( isLongTimeout ) ++ { if ( restart ) { RestartCommand.restart(); } -+ if (isLongTimeout) { break; + } // Paper end }