From 944a3de16fcdcad8229f189bd57c340153a73771 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 49f23440..7f1ef97c 100644 --- a/src/auto_splitting/mod.rs +++ b/src/auto_splitting/mod.rs @@ -862,6 +862,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(); @@ -876,6 +877,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(); } }