From 65e9546f813b151210def2698f5e94c452be6b14 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Fri, 27 Feb 2026 23:42:38 +0300 Subject: [PATCH] tor: reduce service check delay --- src/tor/tor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tor/tor.rs b/src/tor/tor.rs index 3c8a8da5..c0303352 100644 --- a/src/tor/tor.rs +++ b/src/tor/tor.rs @@ -348,7 +348,7 @@ impl Tor { let runtime = client.runtime(); runtime .spawn(async move { - const MAX_ERRORS: i32 = 5; + const MAX_ERRORS: i32 = 12; let mut errors_count = 0; loop { // Check if service is running. @@ -397,8 +397,8 @@ impl Tor { } false }; - // Check with timeout of 60s. - match tokio::time::timeout(Duration::from_millis(60000), check).await { + // Check with timeout of 20s. + match tokio::time::timeout(Duration::from_millis(20000), check).await { Ok(resp) => { match resp { Ok(_) => { @@ -416,8 +416,8 @@ impl Tor { if on_error(&service_id) { break; } - // Check again after 30s. - Duration::from_millis(30000) + // Check again after 5s. + Duration::from_millis(5000) } } }