Skip to content

Commit d7791db

Browse files
committed
Allow Synapse user deactivation to take up to 5 minutes
1 parent 28676f3 commit d7791db

File tree

1 file changed

+3
-1
lines changed
  • crates/matrix-synapse/src

1 file changed

+3
-1
lines changed

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)