更新矩阵同步超时时长为10分钟

This commit is contained in:
shenjack 2024-03-18 04:21:10 +08:00
parent b2229c9663
commit aa20b7f1c3
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -92,7 +92,7 @@ pub async fn start_matrix(
client.add_event_handler(events::on_room_message);
let init_sync_setting = SyncSettings::new().timeout(Duration::from_secs(60));
let init_sync_setting = SyncSettings::new().timeout(Duration::from_mins(10));
match client.sync_once(init_sync_setting).await {
Ok(_) => {
@ -105,7 +105,7 @@ pub async fn start_matrix(
}
let mut stream_sync =
Box::pin(client.sync_stream(SyncSettings::new().timeout(Duration::from_secs(60))).await);
Box::pin(client.sync_stream(SyncSettings::new().timeout(Duration::from_mins(10))).await);
while let Some(Ok(response)) = stream_sync.next().await {
for room in response.rooms.join.values() {