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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user