You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when a WebSocket connection is closed abnormally closeCode remains nil, meaning hacks like this are required to know when it actually closed.
Turns out this one is a bit tricky to solve.
We're going to have to start inspecting all received web socket messages in the background and then forward them to websocket.next() when called, since stuff like while not websocket.closeCode do needs to work properly, and we can only know if the web socket has been closed by trying to receive on it.
I can do this soon, it's not too complicated, just a bit more work than initially expected.
Currently when a WebSocket connection is closed abnormally
closeCode
remainsnil
, meaning hacks like this are required to know when it actually closed.RFC 6455 says the code 1006 should be used for this: https://www.rfc-editor.org/rfc/rfc6455.html#:~:text=If%20_The%20WebSocket%0A%20%20%20Connection%20is%20Closed_%20and%20no%20Close%20control%20frame%20was%20received%20by%20the%0A%20%20%20endpoint%20(such%20as%20could%20occur%20if%20the%20underlying%20transport%20connection%0A%20%20%20is%20lost)%2C%20_The%20WebSocket%20Connection%20Close%20Code_%20is%20considered%20to%20be%0A%20%20%201006.
The text was updated successfully, but these errors were encountered: