Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to close WebSocket: received header with unexpected rsv bits set: true:true:true #519

Open
switchupcb opened this issue Feb 20, 2025 · 2 comments

Comments

@switchupcb
Copy link

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?

@mafredri
Copy link
Member

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
Copy link
Author

switchupcb commented Feb 21, 2025

Could you share a bit more context as to why this is happening and why you consider the error to be OK to ignore?
@mafredri

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#L267

disconnect() definition: https://github.com/switchupcb/disgo/blob/v10/wrapper/session_routine_manager_actions.go#L298

It is OK to ignore because my code works when I ignore it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants