Open
Description
What is the error type of this error so I can ignore it?
Here is an example of an error type within this library.
closeErr := new(websocket.CloseError)
if errors.As(err, closeErr) {
...
}
websocket.CloseError
is an error type within this library.
So, what error type is returned when you receive the error failed to close WebSocket: received header with unexpected rsv bits set: true:true:true
?
Metadata
Metadata
Assignees
Labels
No labels
Activity
mafredri commentedon Feb 20, 2025
Currently there's no specific error type when this happens, it's a plain
fmt.Errorf
error. Could you share a bit more context as to why this is happening and why you consider the error to be OK to ignore?switchupcb commentedon Feb 21, 2025
This error happens when you attempt to close a connected websocket.
Here is the code that causes this error (when the error is not ignored).
disconnect()
closes a websocket: https://github.com/switchupcb/disgo/blob/v10/wrapper/session_routine_manager.go#L267disconnect()
definition: https://github.com/switchupcb/disgo/blob/v10/wrapper/session_routine_manager_actions.go#L298It is OK to ignore because my code works when I ignore it.