From 64130dd02e2c843f76b01707cfa26408bec96a02 Mon Sep 17 00:00:00 2001 From: Alexey <247128645+axkurcom@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:13:40 +0300 Subject: [PATCH] MEP not ready only after 3 attempts --- src/main.rs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 84e61a4..e10c18b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -629,6 +629,7 @@ async fn main() -> std::result::Result<(), Box> { let me2dc_fallback = config.general.me2dc_fallback; let me_init_retry_attempts = config.general.me_init_retry_attempts; + let me_init_warn_after_attempts: u32 = 3; if use_middle_proxy && !decision.ipv4_me && !decision.ipv6_me { if me2dc_fallback { warn!("No usable IP family for Middle Proxy detected; falling back to direct DC"); @@ -832,14 +833,25 @@ async fn main() -> std::result::Result<(), Box> { } else { me_init_retry_attempts.to_string() }; - warn!( - error = %e, - attempt = init_attempt, - retry_limit = retry_limit, - me2dc_fallback = me2dc_fallback, - retry_in_secs = 2, - "ME pool is not ready yet; retrying startup initialization" - ); + if init_attempt >= me_init_warn_after_attempts { + warn!( + error = %e, + attempt = init_attempt, + retry_limit = retry_limit, + me2dc_fallback = me2dc_fallback, + retry_in_secs = 2, + "ME pool is not ready yet; retrying startup initialization" + ); + } else { + info!( + error = %e, + attempt = init_attempt, + retry_limit = retry_limit, + me2dc_fallback = me2dc_fallback, + retry_in_secs = 2, + "ME pool startup warmup: retrying initialization" + ); + } pool.reset_stun_state(); tokio::time::sleep(Duration::from_secs(2)).await; }