-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only attempt resume if the gateway says we can
Per [1] and [2], if the `d` field is set to `true` we may attempt to resume again with the same session, otherwise we should not. nostrum would previously loop on trying to resume on the same session after an invalid session was sent, and the behaviour of simply sending an identify payload did not work as expected. When the session that we try to resume with is invalid, perform a reconnect and do the whole handshake, greeting and meeting the parents thing all over again. [1]: https://discord.com/developers/docs/topics/gateway-events#invalid-session [2]: https://discord.com/developers/docs/topics/gateway#resuming
- Loading branch information
1 parent
c34a563
commit 035839f
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
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