-
Notifications
You must be signed in to change notification settings - Fork 121
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
Move error handling #174
Move error handling #174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for pushing direct to your branch, please let me know if you're happy with this approach as well.
Basically, the reconnection pathway after an error will also be hit by the same bug, so all checks are moved into convert_ws_message
. Given that Discord will now apparently send other WS events during the handshake, I've also demoted all non-{Hello, Ready, Resumed} messages during handshakes to logs rather than an explicit error,
Moves all WS handling of unexpected payloads into the stream to prevent code duplication. This also prevents non-{Hello,Resumed,Ready} messages from causing a handshake failure, as it seems Discord do not prevent such messages from appearing. --------- Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
Moves all WS handling of unexpected payloads into the stream to prevent code duplication. This also prevents non-{Hello,Resumed,Ready} messages from causing a handshake failure, as it seems Discord do not prevent such messages from appearing. --------- Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
Moves all WS handling of unexpected payloads into the stream to prevent code duplication. This also prevents non-{Hello,Resumed,Ready} messages from causing a handshake failure, as it seems Discord do not prevent such messages from appearing. --------- Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
Moves all WS handling of unexpected payloads into the stream to prevent code duplication. This also prevents non-{Hello,Resumed,Ready} messages from causing a handshake failure, as it seems Discord do not prevent such messages from appearing. --------- Co-authored-by: Kyle Simpson <kyleandrew.simpson@gmail.com>
Move the place where we look away from the json error to be higher up as discussed on Discord