Skip to content

fix(websocket): lifecycle events queue integrated to handle sequential closing of websocket - #6099

Open
SudhansuBandha wants to merge 2 commits into
nodejs:mainfrom
SudhansuBandha:fix/websocket-lifecycle-events-queue
Open

SudhansuBandha wants to merge 2 commits into
nodejs:mainfrom
SudhansuBandha:fix/websocket-lifecycle-events-queue

Conversation

@SudhansuBandha

Copy link
Copy Markdown

Implemented Queue to handle websocket lifecycle events.
Sequential Ordering of CLOSING and CLOSE websocket lifecycle events

Fixes: #4741
Fixes: #4742

@SudhansuBandha

SudhansuBandha commented Oct 26, 2026 •

Copy link
Copy Markdown
Author

This is me contributing first time to Undici.
I have tried to develop the task scheduling queue that will help in addressing the sequential lifecycle events occurrence for websocket. I have followed https://websockets.spec.whatwg.org/ and tried to replicate similar setup available on chromium.

I have done this setup that will adress the concering reported issues. Would love to have your feedback whether this is correct or not @KhafraDev based on your concerns. It would be great if you can suggest me further changes that will help me in addressing the bigger picture instead of simply fixing the reported issues

This branch has not been deployed

No deployments
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 transitions back from CLOSED to CLOSING WebSocket events fire synchronously during close() instead of asynchronously

1 participant