MEP not ready only after 3 attempts

This commit is contained in:
Alexey 2026-03-05 16:13:40 +03:00
parent d62a6e0417
commit 64130dd02e
No known key found for this signature in database
1 changed files with 20 additions and 8 deletions

View File

@ -629,6 +629,7 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
let me2dc_fallback = config.general.me2dc_fallback; let me2dc_fallback = config.general.me2dc_fallback;
let me_init_retry_attempts = config.general.me_init_retry_attempts; 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 use_middle_proxy && !decision.ipv4_me && !decision.ipv6_me {
if me2dc_fallback { if me2dc_fallback {
warn!("No usable IP family for Middle Proxy detected; falling back to direct DC"); warn!("No usable IP family for Middle Proxy detected; falling back to direct DC");
@ -832,6 +833,7 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
} else { } else {
me_init_retry_attempts.to_string() me_init_retry_attempts.to_string()
}; };
if init_attempt >= me_init_warn_after_attempts {
warn!( warn!(
error = %e, error = %e,
attempt = init_attempt, attempt = init_attempt,
@ -840,6 +842,16 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
retry_in_secs = 2, retry_in_secs = 2,
"ME pool is not ready yet; retrying startup initialization" "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(); pool.reset_stun_state();
tokio::time::sleep(Duration::from_secs(2)).await; tokio::time::sleep(Duration::from_secs(2)).await;
} }