Mitigate large futures

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-04-26 08:23:57 +00:00 committed by Jade Ellis
commit f3dd90df39
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
6 changed files with 29 additions and 13 deletions

View file

@ -5,7 +5,7 @@ use conduwuit::{
utils::BoolExt,
};
use conduwuit_service::Services;
use futures::TryStreamExt;
use futures::{FutureExt, TryStreamExt};
use ruma::{
OwnedEventId, RoomId, UserId,
api::client::state::{get_state_events, get_state_events_for_key, send_state_event},
@ -63,6 +63,7 @@ pub(crate) async fn send_state_event_for_empty_key_route(
body: Ruma<send_state_event::v3::Request>,
) -> Result<RumaResponse<send_state_event::v3::Response>> {
send_state_event_for_key_route(State(services), body)
.boxed()
.await
.map(RumaResponse)
}