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
Gateway v2 #204
Merged
Merged
Gateway v2 #204
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seailz
added
type: feature
Issue or PR is a feature that should be implemented
priority: high
High priority
status: completed
status: claimed
Issue has a PR open for it.
LARGE
PR or issue with a large amount of additions
IMPORTANT
Important PR or issue that is important to be added/implemented soon.
type: enhancement
status: awaiting testing
labels
Aug 8, 2023
…nexpectedError is thrown
…ct if an invalid session or reconnect payload is sent after 5 seconds.
…tem using the new GW system
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
IMPORTANT
Important PR or issue that is important to be added/implemented soon.
LARGE
PR or issue with a large amount of additions
priority: high
High priority
status: claimed
Issue has a PR open for it.
status: completed
type: enhancement
type: feature
Issue or PR is a feature that should be implemented
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Changes
Closes #0
Description
v2 implementation of Discord's Gateway websocket. This attempts to minimize errors seen with the initial implementation, along with simplifying the implementation, and improving readability, performance, and making it easier to understand.
This is mostly a refactor. Most methods will stay the same and it should look pretty similar to use from outside the GatewayFactory class.
This PR also implements Exponential Backoff for reconnects to help ensure that reconnects still happen in the case of a temporary outage, issue, or downtime, etc. There's also a new Heart implementation that allows for starting, stopping, and restarting a heartbeat cycle.
Other general improvements as well, including better error handling.
Still needs proper testing (which I'm currently doing!) before merge.