fix: Move federation mutex lock to room worker

This commit is contained in:
timedout committed 2026-11-16 00:26:29 +00:00
1 parent 8d15241584
commit 129a3851eb
2 files changed
+8 -7

No files matched your search

-7
View File
@@ -335,13 +335,6 @@ async fn handle_room(
room_id: OwnedRoomId,
pdus: impl Iterator<Item = Pdu> + Send,
) -> std::result::Result<Vec<(OwnedEventId, Result)>, TransactionError> {
let _room_lock = services
.rooms
.event_handler
.mutex_federation
.lock(room_id.as_str())
.await;
let room_id = &room_id;
let mut pdu_map: HashMap<OwnedEventId, CanonicalJsonObject> = pdus
.into_iter()
+8
View File
@@ -64,7 +64,9 @@ impl crate::Service for Service {
loop {
let job = tokio::select! {
() = self.shutdown.notified() => {
conduwuit::info!("Shutting down");
yielding.close();
recv.close();
break;
},
room_id = yielding.recv() => {
@@ -159,6 +161,12 @@ impl Service {
break;
};
conduwuit::debug!(event_id=%job.event_id, origin=%job.origin, "Handling incoming job");
let _room_lock = self
.services
.event_handler
.mutex_federation
.lock(room_id.as_str())
.await;
let event_type = KeyValue::new(
"type",