Yatopia/patches/server/0052-Fix-watchdog-termination-hanging-indefinitely.patch
Ivan Pekov 4c7a91845b
Updated Upstream and Sidestream(s) (Tuinity/Purpur)
Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Tuinity Changes:
4a99f3e Updated Upstream (Paper)
f5d537e Merge https://github.com/Spottedleaf/Tuinity into ver/1.16.3
7936e2b Make async usage of IteratorSafeOrderedReferenceSet less dangerous

Purpur Changes:
2cce22a Updated Upstream (Paper & Tuinity)
8d407a9 Despawn rate for llama spit
2020-09-23 18:38:34 +03:00

23 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Tue, 22 Sep 2020 21:18:24 +0300
Subject: [PATCH] Fix watchdog termination hanging indefinitely
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8e4cdad1b76c24f4e459077c5a2b4b08e0a7134f..825cb882de70aa48f4a1a51b9cf426819d716b75 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -820,6 +820,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MCUtil.asyncExecutor.shutdown(); // Paper
try { MCUtil.asyncExecutor.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS); // Paper
} catch (java.lang.InterruptedException ignored) {} // Paper
+ // Yatopia start - fix watchdog hanging indefinitely
+ MCUtil.cleanerExecutor.shutdown();
+ try { MCUtil.cleanerExecutor.awaitTermination(30, java.util.concurrent.TimeUnit.SECONDS);
+ } catch (InterruptedException ignored) {}
+ // Yatopia end
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
LOGGER.info("Saving usercache.json");
this.getUserCache().b(false); // Paper