diff options
author | Zach Brown <[email protected]> | 2016-05-12 23:04:49 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2016-05-12 23:05:46 -0500 |
commit | 4cfcd525c4cdeaf41165120f34c4c44e792e4c2b (patch) | |
tree | 51f2349a2f2f0fedf313fe934eb75f31d022a825 | |
parent | 6b016cfcbf319ffec7a9b13da33bb85a68ff990c (diff) | |
download | Paper-4cfcd525c4cdeaf41165120f34c4c44e792e4c2b.tar.gz Paper-4cfcd525c4cdeaf41165120f34c4c44e792e4c2b.zip |
Make watchdoge disabler its own patch file
Change implementation, smaller diff, less NPE
-rw-r--r-- | Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch | 14 | ||||
-rw-r--r-- | Spigot-Server-Patches/0154-System-property-for-disabling-watchdoge.patch | 22 |
2 files changed, 25 insertions, 11 deletions
diff --git a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index c9b7784e34..0bd355c62e 100644 --- a/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/Spigot-Server-Patches/0018-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -1,4 +1,4 @@ -From 1a9b35b6da96dd27d24b90dd432fc27a79615bc1 Mon Sep 17 00:00:00 2001 +From 16b868449a03eefbd94542578d058176425e41ae Mon Sep 17 00:00:00 2001 From: Zach Brown <[email protected]> Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -46,10 +46,10 @@ index 3f27fe6..52155e8 100644 private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index 94a3d42..6898b56 100644 +index 94a3d42..3ed983c 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -19,14 +19,14 @@ public class WatchdogThread extends Thread +@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread private WatchdogThread(long timeoutTime, boolean restart) { @@ -58,14 +58,6 @@ index 94a3d42..6898b56 100644 this.timeoutTime = timeoutTime; this.restart = restart; } - - public static void doStart(int timeoutTime, boolean restart) - { -- if ( instance == null ) -+ if ( !Boolean.getBoolean("disable.watchdog") && instance == null ) // Paper - Add property to disable - { - instance = new WatchdogThread( timeoutTime * 1000L, restart ); - instance.start(); @@ -56,9 +56,9 @@ public class WatchdogThread extends Thread { Logger log = Bukkit.getServer().getLogger(); diff --git a/Spigot-Server-Patches/0154-System-property-for-disabling-watchdoge.patch b/Spigot-Server-Patches/0154-System-property-for-disabling-watchdoge.patch new file mode 100644 index 0000000000..3f7db25352 --- /dev/null +++ b/Spigot-Server-Patches/0154-System-property-for-disabling-watchdoge.patch @@ -0,0 +1,22 @@ +From 00816855c6c0d23f13289a10f4e8329ea47ec3f0 Mon Sep 17 00:00:00 2001 +From: Zach Brown <[email protected]> +Date: Thu, 12 May 2016 23:02:58 -0500 +Subject: [PATCH] System property for disabling watchdoge + + +diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java +index 3ed983c..fb57e0d 100644 +--- a/src/main/java/org/spigotmc/WatchdogThread.java ++++ b/src/main/java/org/spigotmc/WatchdogThread.java +@@ -52,7 +52,7 @@ public class WatchdogThread extends Thread + while ( !stopping ) + { + // +- if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime ) ++ if ( lastTick != 0 && System.currentTimeMillis() > lastTick + timeoutTime && !Boolean.getBoolean("disable.watchdog")) // Paper - Add property to disable + { + Logger log = Bukkit.getServer().getLogger(); + log.log( Level.SEVERE, "The server has stopped responding!" ); +-- +2.8.2 + |