discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Clarify if sessions are resumable for each gateway close code

Open Zoddo opened this issue 1 year ago • 5 comments

This PR (which was made after this DDevs thread) attempts to clarify which gateway close codes are potentially resumable, and which ones are not worth trying to resume.

The idea is that libs can immediately reset the shard's session state upon encountering a non-resumable close code, saving a useless connection to the gateway_resume_url.

The information on whether a close code is resumable or not is based solely on my own testing (except for 4001, which has been confirmed to never be resumable by @mrkirby153 in the aforementioned thread).

Zoddo avatar Sep 24 '24 19:09 Zoddo

I'm not sure why the CI fails on the table formatting, everything is correctly aligned when pasting it in an editor with a fixed-width font.

Zoddo avatar Sep 24 '24 19:09 Zoddo

I'm not sure why the CI fails on the table formatting, everything is correctly aligned when pasting it in an editor with a fixed-width font.

I think you have a double space at the end of the second row from the right

valdotle avatar Sep 24 '24 19:09 valdotle

I think it makes more sense to have the table split into two columns: reconnect and resume.

So it'd look something like

Close Code Reconnect Resume
1234 true false
5678 false false

mrkirby153 avatar Sep 25 '24 02:09 mrkirby153

Yeah, I hesitated, but a single Action column looked more readable.

I'm updating the PR to use 2 columns.

Zoddo avatar Sep 25 '24 15:09 Zoddo

Rebased changes on main

Zoddo avatar Jun 01 '25 10:06 Zoddo