add handler in case heartbeat is not acked (#1013)

* add handler in case heartbeat is not acked

* ffs
This commit is contained in:
Gus Caplan
2016-12-24 05:04:27 -06:00
committed by Amish Shah
parent 7c12fdcb56
commit 3eca3ba95e
3 changed files with 19 additions and 8 deletions

View File

@@ -416,6 +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);
}
_setPresence(id, presence) {