fix heartbeats once and for all (#1016)

This commit is contained in:
Gus Caplan
2016-12-25 10:28:36 -06:00
committed by Amish Shah
parent fb6a8d1637
commit 2410fdf8d2
6 changed files with 25 additions and 18 deletions

View File

@@ -416,7 +416,7 @@ class Client extends EventEmitter {
_pong(startTime) {
this.pings.unshift(Date.now() - startTime);
if (this.pings.length > 3) this.pings.length = 3;
this.clearTimeout(this._ackTimeout);
this.ws.lastHeartbeatAck = true;
}
_setPresence(id, presence) {