fix(gateway): use resume_gateway_url when reconnecting#439
Open
NickIsADev wants to merge 1 commit intoSinisterRectus:masterfrom
Open
fix(gateway): use resume_gateway_url when reconnecting#439NickIsADev wants to merge 1 commit intoSinisterRectus:masterfrom
NickIsADev wants to merge 1 commit intoSinisterRectus:masterfrom
Conversation
Contributor
Author
|
I've also noticed that Discordia does not properly produce jitter on the initial heartbeat, however I'm unsure of how to approach this issue while keeping the code clean and readable. I've thought of just using Documentation Reference: https://docs.discord.com/developers/events/gateway#heartbeat-interval |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull requests implements the missing handling of
resume_gateway_url, which was added to the Gateway in August of 2022 (https://docs.discord.com/developers/change-log#session-specific-gateway-resume-urls). The system was pushed into full use later in September of the same year.This system does not exist for the Voice Gateway at the moment, hence why no changes were made there.
Changes:
Shard._resume_gateway_urlwhen receiving it via theREADYeventShard._resume_gateway_urlto reconnect if available, otherwise use original gateway URLDocumentation Reference: https://docs.discord.com/developers/events/gateway#preparing-to-resume