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
dmitshur
changed the title
When WebSocket.Send is called on a closed WebSocket, no error returned.
When Send is called on a closed WebSocket, no error returned.
Jan 26, 2015
I wonder if there's a way that we could capture the exception and return it, though.
I agree that would be better. It's clean, correct, consistent, and doesn't incur an extra performance penalty every time sending on an open socket. I would only fall back to checking ReadyState as a backup, if we can't get anything else to work.
The problem is already mentioned in code, see wrapper.go#L97-L98.
I can confirm the issue.
Send
returns nil error, but there is aWebSocket is already in CLOSING or CLOSED state.
error in the console.Any ideas on how we can fix this?
The text was updated successfully, but these errors were encountered: