diff --git a/patches/server/Improved-Watchdog-Support.patch b/patches/server/Improved-Watchdog-Support.patch index 4d3d108f8d..f8e16778f6 100644 --- a/patches/server/Improved-Watchdog-Support.patch +++ b/patches/server/Improved-Watchdog-Support.patch @@ -142,19 +142,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.status = this.buildServerStatus(); // Spigot start -+ // Paper start - move done tracking ++ // Paper start - Improved Watchdog Support + LOGGER.info("Running delayed init tasks"); + this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // run all 1 tick delay tasks during init, + // this is going to be the first thing the tick process does anyways, so move done and run it after + // everything is init before watchdog tick. + // anything at 3+ won't be caught here but also will trip watchdog.... + // tasks are default scheduled at -1 + delay, and first tick will tick at 1 -+ String doneTime = String.format(java.util.Locale.ROOT, "%.3fs", (double) (Util.getNanos() - serverStartTime) / 1.0E9D); + final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time -+ LOGGER.info("Done (tick thread startup: {}, total: {})! For help, type \"help\"", doneTime, String.format(java.util.Locale.ROOT, "%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time -+ // Paper end -+ -+ org.spigotmc.WatchdogThread.tick(); // Paper ++ LOGGER.info("Done ({})! For help, type \"help\"", String.format(java.util.Locale.ROOT, "%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time ++ org.spigotmc.WatchdogThread.tick(); ++ // Paper end - Improved Watchdog Support org.spigotmc.WatchdogThread.hasStarted = true; // Paper Arrays.fill( this.recentTps, 20 ); // Paper start - further improve server tick loop @@ -230,7 +228,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D); - DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); -+ //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init ++ DedicatedServer.LOGGER.info("Done preparing level \"{}\" ({})", this.getLevelIdName(), s); // Paper - clarify startup log messages & add total time if (dedicatedserverproperties.announcePlayerAchievements != null) { ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this.overworld()); // CraftBukkit - per-world }