Skip to content

Commit

Permalink
Fix races when muting/unmuting (#2370)
Browse files Browse the repository at this point in the history
await on the async operation so the promise we return resolves once
everything's actuall complete
  • Loading branch information
dbkr authored May 13, 2022
1 parent 38e54ae commit 87791cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webrtc/groupCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export class GroupCall extends TypedEventEmitter<GroupCallEvent, GroupCallEventH
}

for (const call of this.calls) {
call.setMicrophoneMuted(muted);
await call.setMicrophoneMuted(muted);
}

this.emit(GroupCallEvent.LocalMuteStateChanged, muted, this.isLocalVideoMuted());
Expand Down

0 comments on commit 87791cd

Please sign in to comment.