mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +00:00
Reset sequence when sessions are invalidated
This commit is contained in:
parent
37b1f38ebe
commit
0754ddbc34
1 changed files with 1 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue