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
{{ message }}
Repository navigation
WebSocket fires both close and error events twice if the socket is closed before being opened. #4628
Activity
fix: prevent duplicate error and close events in WebSocket
KhafraDev commentedon Oct 18, 2025
In other environments I get
Why do you expect the state to be CLOSING (2) when emitting the error event?
zbinlin commentedon Oct 19, 2025
In
wspackage, the readyState is 2.KhafraDev commentedon Oct 19, 2025
I think this is the same as #4487 (comment), or at least close to it. The readyState being CLOSING seems to be correct and makes more sense.