Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop adding session id with every call to getMicrophonePresences #4798

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

gfodor
Copy link
Contributor

@gfodor gfodor commented Nov 1, 2021

There is a bug in getMicrophonePresences which causes it to add the sessionId to the sessionIds list every time it is called. The result is that for long lived sessions this list gets longer and longer, slowing the function down. This PR properly checks to ensure the same session id is not added twice. The reason a proper Set is not used (somewhat ironically) is to avoid the for (of) allocation that would be there since this is called on a setTimeout.

@johnshaughnessy johnshaughnessy merged commit c425de2 into Hubs-Foundation:master Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants