-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[docs] add resume_gateway_url documentation #5282
Conversation
Co-authored-by: Florian Spieß <[email protected]>
Out of curiosity, what will the property return in the future? |
Will there be new error scenarios we need to prepare for if the resume URL is invalidated? |
Co-authored-by: snek <[email protected]>
Co-authored-by: snek <[email protected]>
we'll make an actual announcement in the ddevs server in a few days to ask people to make this change and share timelines! we aim to give you plenty of time to do it.
This is to prepare for some internal changes related to availability zones, in the future there will probably be a set of resume urls that point to different zones and we ask that you reconnect to the one that you get in the ready payload
If you're trying to resume a session ID we ask you use the resume URL we provided along with the session ID in the ready payload. After some adjustment period to let people update their code, if you're still using the one you use for new sessions ("wss://gateway.discord.gg/"), the resume will still succeed but you can expect to be booted off and forced to resume again sooner than you otherwise would be. |
I think an entry should be added to the changelog :) |
Quick question: if the resume fails (the gateway responds with OP9 Invalid Session), can we send an |
@daisyzhou would it be possible to get an answer on this? |
Whatever the answer to this is, we should explicitly detail it in the docs. |
oh, good question. If the resume fails, please reconnect to the main gateway entry point (in theory whatever you have cached from the Get Gateway or Get Gateway Bot endpoints https://discord.com/developers/docs/topics/gateway#get-gateway, or I'll add this to the docs |
please hold -- we might change this, sorry for the churn |
Is there any timeline for this "subject to change" addition that is coming in mid September and has already been announced? Would rather get this in to libraries earlier instead of sitting on the edge of my seat, waiting to see if there may be a change. |
I would just like to state, so people don't get confused. This is an optional change that we prefer people implement. But if you do not, the worst that will happen is we will just disconnect your web-socket a bit more often, in hopes that your reconnect will land you to the right destination. So, the worst case is "you have to resume a bit more often as we bump you around until your connection lands on the right zone." |
Which, is of course not preferred. |
@daisyzhou how long do we need to keep holding, has a verdict been reached yet? |
For now
resume_gateway_url
is still always"wss://gateway.discord.gg/"
but in a few weeks we'll start sending different values for resume_gateway_url"wss://gateway.discord.gg/" will continue to work but may force a faster reconnect starting in a couple months