From e3d3e7fe5daa90c7097ccb3f753d874ffac84fd8 Mon Sep 17 00:00:00 2001 From: ErrorNoInternet Date: Wed, 26 Mar 2025 08:04:48 -0400 Subject: [PATCH] refactor(matrix): increase sync timeout --- src/matrix/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/mod.rs b/src/matrix/mod.rs index bd96445..a9d5a72 100644 --- a/src/matrix/mod.rs +++ b/src/matrix/mod.rs @@ -1,7 +1,7 @@ mod bot; mod verification; -use std::{path::Path, sync::Arc}; +use std::{path::Path, sync::Arc, time::Duration}; use anyhow::{Context as _, Result}; use bot::{on_regular_room_message, on_stripped_state_member}; @@ -80,7 +80,7 @@ pub async fn login(state: &State, options: &Table, globals: &Table, name: String let client = builder.build().await?; let mut new_session; - let mut sync_settings = SyncSettings::default(); + let mut sync_settings = SyncSettings::new().timeout(Duration::from_secs(60)); let session_file = root_dir.join("session.json"); if let Some(session) = fs::read_to_string(&session_file) .await