From bc4e7e5698a0ba7adafbf9780751b7e5cd145da8 Mon Sep 17 00:00:00 2001 From: "nieznany.sprawiciel" Date: Tue, 10 Sep 2024 16:15:30 +0200 Subject: [PATCH] TimedMutex - don't return after exceeded timeout --- core/payment/src/timeout_lock.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/payment/src/timeout_lock.rs b/core/payment/src/timeout_lock.rs index 8178e350b..aea6b841b 100644 --- a/core/payment/src/timeout_lock.rs +++ b/core/payment/src/timeout_lock.rs @@ -106,11 +106,6 @@ impl TimedMutex { match tokio::time::timeout(Duration::from_secs(10), receiver.recv()).await { Err(_) => { log::warn!("[TimedMutex] Long running task: {task_name}!"); - counter += 1; - // five minutes - if counter > 30 { - return; - } } Ok(None) => log::warn!("[TimedMutex] Unexpected mpsc close."), Ok(Some(TimedMutexTaskMessage::Finish)) => break,