Luminol-Core/folia-server/paper-patches/features/0006-Add-watchdog-thread.patch
2026-06-30 18:32:29 +08:00

22 lines
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Fri, 30 Aug 2024 18:34:32 -0700
Subject: [PATCH] Add watchdog thread
When regions take too long, having the server print the stacktrace
of the ticking region should help debug the cause.
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index c77748061f1c8bb2b0dc8dbd80f608d431752015..eafdb55d7418606dbca0b3bc4787501fed872c0a 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -156,7 +156,7 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
}
}
- private static void dumpThread(ThreadInfo thread, Logger logger) {
+ public static void dumpThread(ThreadInfo thread, Logger logger) { // Folia - watchdog - public
logger.log(Level.SEVERE, "------------------------------");
logger.log(Level.SEVERE, "Current Thread: " + thread.getThreadName());