From 5d7813bf3e251ea044bd63f66451c7a0ed4ceb6f Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sat, 1 Jun 2024 13:37:50 -0400 Subject: [PATCH] Fix watchdog crash on server start --- .../java/org/embeddedt/modernfix/world/IntegratedWatchdog.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/src/main/java/org/embeddedt/modernfix/world/IntegratedWatchdog.java b/common/src/main/java/org/embeddedt/modernfix/world/IntegratedWatchdog.java index cfa52d7e..cfb4a0de 100644 --- a/common/src/main/java/org/embeddedt/modernfix/world/IntegratedWatchdog.java +++ b/common/src/main/java/org/embeddedt/modernfix/world/IntegratedWatchdog.java @@ -37,6 +37,9 @@ public class IntegratedWatchdog extends Thread { if(!lastTickStart.isPresent()) { return; } + if(lastTickStart.getAsLong() < 0) { + continue; + } long curTime = Util.getMillis(); long delta = curTime - lastTickStart.getAsLong(); if(delta > MAX_TICK_DELTA) {