fix: increase admin-room poll timeout from 5s to 15s

tuwunel can take longer than 5 seconds to process admin-room commands
during startup when the homeserver is under load. Bump poll count 5→15
and update timeout message strings to match.
This commit is contained in:
atlas 2026-06-04 15:39:27 +02:00 committed by mara
commit 74253a9f71

View file

@ -491,8 +491,10 @@ async fn admin_room_reset_password(
anyhow::bail!("matrix: admin room send failed: {body}");
}
// Poll for a bot response containing the new password (up to 5 × 1 s).
for attempt in 0..5_u8 {
// Poll for a bot response containing the new password (up to 15 × 1 s).
// tuwunel can take several seconds to process the admin-room command
// during startup when the homeserver is under load.
for attempt in 0..15_u8 {
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
let from_encoded = from_token.replace(':', "%3A").replace('+', "%2B");
let poll_url = format!(
@ -537,7 +539,7 @@ async fn admin_room_reset_password(
anyhow::bail!(
"matrix: admin room reset-password for @{localpart}:{server_name}: no password \
response received within 5 seconds. Command sent: '{command}'. \
response received within 15 seconds. Command sent: '{command}'. \
Verify the admin room accepts 'reset-password @user:server' commands."
)
}