From 0754ddbc345320aad2c795056195c003f8304641 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sun, 30 Apr 2017 22:26:44 +0100 Subject: [PATCH] Reset sequence when sessions are invalidated --- src/client/websocket/WebSocketConnection.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/websocket/WebSocketConnection.js b/src/client/websocket/WebSocketConnection.js index 4ed353fe8..189cd2cdf 100644 --- a/src/client/websocket/WebSocketConnection.js +++ b/src/client/websocket/WebSocketConnection.js @@ -307,6 +307,7 @@ class WebSocketConnection extends EventEmitter { return this.reconnect(); case Constants.OPCodes.INVALID_SESSION: if (!packet.d) this.sessionID = null; + this.sequence = -1; this.debug('Session invalidated -- will identify with a new session'); return this.identify(packet.d ? 2500 : 0); case Constants.OPCodes.HEARTBEAT_ACK: