fix(base): Take the state store lock before updating it.

This patch updates
`BaseClient::receive_sync_response_with_requested_required_states` to
take the state store lock before applying any change onto it.
This commit is contained in:
Ivan Enderlin
2025-09-23 15:28:06 +02:00
parent f7e1866bda
commit d00cfb0ba8
+5 -1
View File
@@ -806,7 +806,11 @@ impl BaseClient {
.await;
// Save the new display name updates if any.
processors::changes::save_only(context, &self.state_store).await?;
{
let _sync_lock = self.sync_lock().lock().await;
processors::changes::save_only(context, &self.state_store).await?;
}
for (room_id, member_ids) in updated_members_in_room {
if let Some(room) = self.get_room(&room_id) {