Skip to content

Commit 79bf027

Browse files
authored
Allow user deactivation on the Synapse side to take longer than 30s (#4471)
2 parents 2622de1 + d7791db commit 79bf027

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/http/src/reqwest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ pub fn client() -> reqwest::Client {
9898
.user_agent(USER_AGENT)
9999
.timeout(Duration::from_secs(60))
100100
.connect_timeout(Duration::from_secs(30))
101-
.read_timeout(Duration::from_secs(30))
102101
.build()
103102
.expect("failed to create HTTP client")
104103
}

crates/matrix-synapse/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// SPDX-License-Identifier: AGPL-3.0-only
55
// Please see LICENSE in the repository root for full details.
66

7-
use std::collections::HashSet;
7+
use std::{collections::HashSet, time::Duration};
88

99
use anyhow::{Context, bail};
1010
use error::SynapseResponseExt;
@@ -476,6 +476,8 @@ impl HomeserverConnection for SynapseConnection {
476476
let response = self
477477
.post(&format!("_synapse/admin/v1/deactivate/{mxid}"))
478478
.json(&SynapseDeactivateUserRequest { erase })
479+
// Deactivation can take a while, so we set a longer timeout
480+
.timeout(Duration::from_secs(60 * 5))
479481
.send_traced()
480482
.await
481483
.context("Failed to deactivate user in Synapse")?;

0 commit comments

Comments
 (0)