- Notifications
You must be signed in to change notification settings - Fork329
ws_js: return c.closeErr when closed during read#505
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
I am unable to reproduce the test failure locally (when running
It looks like a possible issue starting Chrome in CI?https://github.com/coder/websocket/pull/505/checks#step:4:102 |
According to an announcement from GitHub, The runner executed with Ubuntu 24.04.1:https://github.com/coder/websocket/pull/505/checks#step:1:4 |
Return the close error when the WebSocket is closed (when running in WASM).
Previously, when the WebSocket connection is closed by the server,
Read
always returnsnet.ErrClosed
, which prevents the correct handling of a close error with certain close status codes.This might not be the best way to fix this, however we have been using this patch in production since June and it appears to resolve the issue and makes it possible to implement logic depending on the close code.