mirror of
https://github.com/PaperMC/Folia.git
synced 2025-08-07 06:31:47 +00:00
22 lines
1.1 KiB
Diff
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 471941a5bf691d4c31b2eb5ef4a11dc91499f674..6c6606800cf8b8ecc0da51963e846dbcab7f2fba 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());
|