mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
Fix CraftServer#isPrimaryThread
md_5 changed it so he could shut down the server asynchronously from watchdog, although we have patches that prevent that type of behavior for this exact reason.
This commit is contained in:
parent
b3cf37c102
commit
8ff0f5c10d
1 changed files with 23 additions and 0 deletions
23
Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread.patch
Normal file
23
Spigot-Server-Patches/Fix-CraftServer-isPrimaryThread.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Mon, 13 May 2019 21:10:59 -0700
|
||||
Subject: [PATCH] Fix CraftServer#isPrimaryThread
|
||||
|
||||
md_5 changed it so he could shut down the server asynchronously
|
||||
from watchdog, although we have patches that prevent that type
|
||||
of behavior for this exact reason.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 56e8a613e9..22d53844c5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
- return Thread.currentThread().equals(console.serverThread) || console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
+ return Thread.currentThread().equals(console.serverThread); // Paper - Fix issues with detecting main thread properly
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
Loading…
Add table
Reference in a new issue