From 74253a9f714f9f4de40a19c7df6ff771cbca96ac Mon Sep 17 00:00:00 2001 From: atlas Date: Thu, 4 Jun 2026 15:39:27 +0200 Subject: [PATCH] fix: increase admin-room poll timeout from 5s to 15s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- hive-c0re/src/matrix.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hive-c0re/src/matrix.rs b/hive-c0re/src/matrix.rs index 579ecf9c..29841e19 100644 --- a/hive-c0re/src/matrix.rs +++ b/hive-c0re/src/matrix.rs @@ -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." ) }