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