feat(policy-server): Add configurable timeout

This commit is contained in:
nexy7574 2025-07-23 17:46:43 +01:00
commit f335f45017
No known key found for this signature in database
GPG key ID: 0FA334385D0B689F
3 changed files with 36 additions and 1 deletions

View file

@ -65,7 +65,7 @@ pub async fn ask_policy_server(&self, pdu: &PduEvent, room_id: &RoomId) -> Resul
"Checking event for spam with policy server"
);
let response = tokio::time::timeout(
Duration::from_secs(10),
Duration::from_secs(self.services.server.config.policy_server_request_timeout),
self.services
.sending
.send_federation_request(via, PolicyRequest {