From d318c766456aa02f16cddf431bf8aca05b748d84 Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Fri, 31 May 2024 19:23:11 -0400 Subject: [PATCH] timeout message --- src/auto_splitting/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/auto_splitting/mod.rs b/src/auto_splitting/mod.rs index 04c6f55e..f9e68689 100644 --- a/src/auto_splitting/mod.rs +++ b/src/auto_splitting/mod.rs @@ -840,6 +840,7 @@ async fn watchdog( interrupt_receiver: watch::Receiver>, ) { const TIMEOUT: Duration = Duration::from_secs(5); + let mut has_timed_out = false; loop { let instant = *timeout_receiver.borrow(); @@ -854,6 +855,10 @@ async fn watchdog( Ok(Err(_)) => return, Err(_) => { if let Some(handle) = &*interrupt_receiver.borrow() { + if !has_timed_out { + log::error!(target: "Auto Splitter", "timeout, no update in {} seconds", TIMEOUT.as_secs_f32()); + has_timed_out = true; + } handle.interrupt(); } }