fix: add 5s timeout to email config lookup to prevent hanging
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
This commit is contained in:
parent
4ae695764e
commit
30bb764876
1 changed files with 1 additions and 1 deletions
|
|
@ -900,7 +900,7 @@ impl SecretsManager {
|
||||||
let _ = tx.send(result);
|
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 (
|
return (
|
||||||
secrets.get("smtp_host").cloned().unwrap_or_default(),
|
secrets.get("smtp_host").cloned().unwrap_or_default(),
|
||||||
secrets.get("smtp_port").and_then(|p| p.parse().ok()).unwrap_or(587),
|
secrets.get("smtp_port").and_then(|p| p.parse().ok()).unwrap_or(587),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue