mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
correctly handle invalid session (#1020)
* correctly handle invalid session * give discord some time, use it wisely
This commit is contained in:
@@ -78,8 +78,14 @@ class WebSocketPacketManager {
|
||||
}
|
||||
|
||||
if (packet.op === Constants.OPCodes.INVALID_SESSION) {
|
||||
this.ws.sessionID = null;
|
||||
this.ws._sendNewIdentify();
|
||||
if (packet.d) {
|
||||
setTimeout(() => {
|
||||
this.ws._sendResume();
|
||||
}, 2500);
|
||||
} else {
|
||||
this.ws.sessionID = null;
|
||||
this.ws._sendNewIdentify();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user