-
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
don't use resume_gateway_url
on resume failure
#5323
Conversation
@@ -186,7 +186,7 @@ Your client should store the `session_id` and `resume_gateway_url` from the [Rea | |||
} | |||
``` | |||
|
|||
If successful, the gateway will respond by replaying all missed events in order, finishing with a [Resumed](#DOCS_TOPICS_GATEWAY/resumed) event to signal replay has finished, and all subsequent events are new. It's also possible that your client cannot reconnect in time to resume, in which case the client will receive a [Opcode 9 Invalid Session](#DOCS_TOPICS_GATEWAY/invalid-session) and is expected to wait a random amount of time—between 1 and 5 seconds—then send a fresh [Opcode 2 Identify](#DOCS_TOPICS_GATEWAY/identify). | |||
If successful, the gateway will respond by replaying all missed events in order, finishing with a [Resumed](#DOCS_TOPICS_GATEWAY/resumed) event to signal replay has finished, and all subsequent events are new. It's also possible that your client cannot reconnect in time to resume, in which case the client will receive a [Opcode 9 Invalid Session](#DOCS_TOPICS_GATEWAY/invalid-session) and is expected to wait a random amount of time—between 1 and 5 seconds—then send a fresh [Opcode 2 Identify](#DOCS_TOPICS_GATEWAY/identify). The fresh identify should not use the `resume_gateway_url`; instead it should use the normal websocket endpoint from the [Get Gateway](#DOCS_TOPICS_GATEWAY/get-gateway) or the [Get Gateway Bot](#DOCS_TOPICS_GATEWAY/get-gateway-bot) endpoints. |
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.
As a note,
It's also possible that your client cannot reconnect in time to resume, in which case the client will receive a Opcode 9 Invalid Session and is expected to wait a random amount of time—between 1 and 5 seconds—then send a fresh Opcode 2 Identify.
This content is odd. It feels like this is saying "you can waiting 1-5 seconds after receiving an Op 9 and then send an IDENTIFY on the same WS connection that you received the Op 9 on" instead of tearing down the WS connection and starting a new one.
Your followup message does clarify that users should not reused the Op 9'd WS connection, but I think it's something important to call out here that is odd and has historically been odd as I think some users actually do just send IDENTIFY on the same WS without teardown and reconnect after Op 9 response from RESUME. 😕
in #5374 |
#5282 (comment) |
No description provided.