From c7bacf33e31c53bc6a18fea40f1970a094267bf2 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 21 Sep 2021 12:45:27 +0900 Subject: [PATCH] Fix invalid if condition to fetch shared data --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 9bf5b32..ed8ad26 100644 --- a/src/main.rs +++ b/src/main.rs @@ -739,7 +739,10 @@ async fn main() -> Result<(), String> { } timer = CHECK_SHARED_WAIT_TIME; let dirty_flag = atomic_dirty_flag.load(Ordering::Relaxed); - if dirty_flag || check_due_to_track_timer_count < CHECK_TRACK_TIMER_MAX_COUNT { + if dirty_flag + || (track_timer < 0.0 + && check_due_to_track_timer_count < CHECK_TRACK_TIMER_MAX_COUNT) + { if dirty_flag { atomic_dirty_flag.store(false, Ordering::Relaxed); }