From a3f5b836772d54464e18302beb132f4c19b8adf8 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Fri, 24 May 2024 16:07:58 +0300 Subject: [PATCH] chore: lower gate guard drop logging threshold to 100ms (#7862) We have some 1001ms cases, which do not yield gate guard context. --- libs/utils/src/sync/gate.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/utils/src/sync/gate.rs b/libs/utils/src/sync/gate.rs index c34176af57..156b99a010 100644 --- a/libs/utils/src/sync/gate.rs +++ b/libs/utils/src/sync/gate.rs @@ -135,7 +135,8 @@ impl Gate { let started_at = std::time::Instant::now(); let mut do_close = std::pin::pin!(self.do_close()); - let nag_after = Duration::from_secs(1); + // with 1s we rarely saw anything, let's try if we get more gate closing reasons with 100ms + let nag_after = Duration::from_millis(100); let Err(_timeout) = tokio::time::timeout(nag_after, &mut do_close).await else { return;