fix: add 5s timeout to email config lookup to prevent hanging
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-04 23:35:20 -03:00
parent 4ae695764e
commit 30bb764876

View file

@ -900,7 +900,7 @@ impl SecretsManager {
let _ = tx.send(result);
});
if let Ok(Some(secrets)) = rx.recv() {
if let Ok(Some(secrets)) = rx.recv_timeout(std::time::Duration::from_secs(5)) {
return (
secrets.get("smtp_host").cloned().unwrap_or_default(),
secrets.get("smtp_port").and_then(|p| p.parse().ok()).unwrap_or(587),