mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
Reset sequence when sessions are invalidated
This commit is contained in:
@@ -307,6 +307,7 @@ class WebSocketConnection extends EventEmitter {
|
|||||||
return this.reconnect();
|
return this.reconnect();
|
||||||
case Constants.OPCodes.INVALID_SESSION:
|
case Constants.OPCodes.INVALID_SESSION:
|
||||||
if (!packet.d) this.sessionID = null;
|
if (!packet.d) this.sessionID = null;
|
||||||
|
this.sequence = -1;
|
||||||
this.debug('Session invalidated -- will identify with a new session');
|
this.debug('Session invalidated -- will identify with a new session');
|
||||||
return this.identify(packet.d ? 2500 : 0);
|
return this.identify(packet.d ? 2500 : 0);
|
||||||
case Constants.OPCodes.HEARTBEAT_ACK:
|
case Constants.OPCodes.HEARTBEAT_ACK:
|
||||||
|
|||||||
Reference in New Issue
Block a user