fix: Don't attempt to contact origins as a notary more than once a minute

This commit is contained in:
timedout authored and Jade Ellis committed 2026-10-14 10:32:36 +01:00
1 parent a5a7905494
commit 39cd151ca3
3 files changed
+38 -8

No files matched your search

+6 -3
View File
@@ -177,10 +177,13 @@ pub(crate) async fn get_remote_server_keys_route(
body: Ruma<get_remote_server_keys::v2::Request>,
) -> Result<get_remote_server_keys::v2::Response> {
let min_valid_ts = body.minimum_valid_until_ts;
if let Ok(response) = services
if services
.server_keys
.origin_request(body.server_name.clone(), min_valid_ts)
.await
.notary_may_contact_origin(&body.server_name)
&& let Ok(response) = services
.server_keys
.origin_request(body.server_name.clone(), min_valid_ts)
.await
{
return sign_ssk(&services, response, &body.server_name)
.await