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

refactor websocket control frame handling #3241

Merged

Conversation

KhafraDev
Copy link
Member

@KhafraDev KhafraDev commented May 10, 2024

Closes #3239
Closes #2859

Control frames cannot be fragmented which guarantees that they will be handled in full in a single message. Since this is the case, there's no reason to assign values to this.#info (which is the internal state/settings of a frame) which should avoid race conditions.

@KhafraDev KhafraDev force-pushed the refactor-websocket-control-frame-handling branch from 67ee2d2 to f7a4534 Compare May 11, 2024 03:13
Co-authored-by: tai-kun <taikun.dev@gmail.com>
@KhafraDev KhafraDev force-pushed the refactor-websocket-control-frame-handling branch from f7a4534 to b5e4452 Compare May 11, 2024 03:14
@KhafraDev
Copy link
Member Author

@Uzlopak @tsctx

@KhafraDev
Copy link
Member Author

@nodejs/undici

@KhafraDev KhafraDev merged commit 9302599 into nodejs:main May 11, 2024
30 checks passed
@KhafraDev KhafraDev deleted the refactor-websocket-control-frame-handling branch May 11, 2024 20:36
@KhafraDev
Copy link
Member Author

thank you

@github-actions github-actions bot mentioned this pull request May 17, 2024
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.

WebSocket: message handler sometimes called with null data (potentially issue in frame processing)
2 participants