Skip to content

Commit

Permalink
lock in one more place
Browse files Browse the repository at this point in the history
  • Loading branch information
codabrink committed Dec 16, 2024
1 parent e849b2d commit 10edef7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xmtp_mls/src/groups/mls_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1301,8 +1301,9 @@ where
inbox_ids_to_add: &[InboxIdRef<'_>],
inbox_ids_to_remove: &[InboxIdRef<'_>],
) -> Result<UpdateGroupMembershipIntentData, GroupError> {
let mls_group = self.load_mls_group(provider)?;
let existing_group_membership = extract_group_membership(mls_group.extensions())?;
let mut mls_group = self.load_mls_group(provider)?;
let locked_mls_group = mls_group.lock().await;
let existing_group_membership = extract_group_membership(locked_mls_group.extensions())?;

// TODO:nm prevent querying for updates on members who are being removed
let mut inbox_ids = existing_group_membership.inbox_ids();
Expand Down

0 comments on commit 10edef7

Please sign in to comment.