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 race condition on WebSocket disconnect #1266

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

paullouisageneau
Copy link
Owner

Should fix #1260

@SeanMollet
Copy link

@paullouisageneau Yes, this fixes it. Thank you.

Am I correct in my reading that this ultimately results in the timeout cleaning things up later and that's why it's safe to skip the earlier remoteClose?

@SeanMollet
Copy link

Fixes #1260

@paullouisageneau
Copy link
Owner Author

Am I correct in my reading that this ultimately results in the timeout cleaning things up later and that's why it's safe to skip the earlier remoteClose?

It cleans up later but not on a timeout. Now, only WsTransport changing state can trigger close after the initial connection, so the EOF event has to travel trough the TCP and TLS layers, ensuring messages are delivered first.

@paullouisageneau paullouisageneau merged commit 9bbc79b into master Oct 2, 2024
12 checks passed
@paullouisageneau paullouisageneau deleted the fix-ws-race-disconnect branch October 2, 2024 09:29
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 response + disconnect race condition?
2 participants