-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[WS] Fix peer stuck in CLOSING state #101760
Conversation
This was due by the buffer being cleared on close (including in closing state) preventing further reads. This commit changes the close logic to only clear the buffer when the peer connection has been fully closed (acknowledged by the other end, or closed due to a "broken" connection).
af89218
to
81181c5
Compare
Wouldn't the same bug lurk here? godot/modules/websocket/emws_peer.cpp Lines 180 to 198 in 7b1ed52
( |
Not really, at least for now, because we can't control reads on the Web, since the Web API is callback-based (so reads will happen even if the buffer if zero, and we'd be dropping data, but close events will always be processed): godot/modules/websocket/emws_peer.cpp Lines 54 to 59 in 7b1ed52
godot/modules/websocket/library_godot_websocket.js Lines 113 to 120 in 7b1ed52
|
Thanks! |
This was due by the buffer being cleared on close (including in closing state) preventing further reads.
This commit changes the close logic to only clear the buffer when the peer connection has been fully closed (acknowledged by the other end, or closed due to a "broken" connection).
Fixes #100948