Skip to content

Commit

Permalink
fixed infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
digitallysavvy committed Apr 3, 2024
1 parent 3fc9d59 commit 87e86c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agora-live-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ const getNewUidForMainUser = () => {
}
// make sure the random Uid is not the main uid
let newUid = getRandomUid()
while (newUid == mainStreamUid) {
while (allUids.length > 1 && newUid == mainStreamUid) {
newUid = getRandomUid()
}

Expand Down

0 comments on commit 87e86c8

Please sign in to comment.