Skip to content

Commit cd8fc05

Browse files
f3rnoJacobPlaster
authored andcommitted
(fix) ignore notification auth sequence numbers, they no longer advance, closes #423
1 parent dcfbace commit cd8fc05

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/transports/ws2.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,7 @@ class WSv2 extends EventEmitter {
326326
// 0 packets, these are included as the 2nd to last value
327327
const seq = (
328328
(msg[0] === 0) &&
329-
(msg[1] !== 'hb') &&
330-
!(msg[1] === 'n' && msg[2][6] === 'ERROR') // error notifications lack seq
329+
(msg[1] !== 'hb')
331330
)
332331
? msg[msg.length - 2]
333332
: msg[msg.length - 1]
@@ -347,7 +346,7 @@ class WSv2 extends EventEmitter {
347346

348347
if (!isFinite(authSeq)) return null
349348
if (authSeq === 0) return null // still syncing
350-
if (msg[1] === 'n' && msg[2][6] === 'ERROR') return null // err notifications lack seq
349+
if (msg[1] === 'n') return null // notifications don't advance seq
351350
if (authSeq === this._lastAuthSeq) return null // seq didn't advance
352351

353352
// check

0 commit comments

Comments
 (0)