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

fix(websocket): use binary operations instead of a Set for closeStatus #3635

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Sep 21, 2024

Follow up to #3628

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to avoid the set but nothing here is a hot path - websockets are not closed often.

It's not worth the mental overhead. The websocket closing handshake is an extremely cold path.

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Sep 21, 2024

Using a Set is an unconventional and to honest very ugly Implementation in our codebase. I strongly recommend to avoid ES6 Sets to just store 2 bit information...

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