Improve some Gus shenanigans

This commit is contained in:
Schuyler Cebulskie
2016-12-27 22:30:51 -05:00
parent 14ba0373eb
commit 84991c767e

View File

@@ -93,11 +93,9 @@ class WebSocketPacketManager {
this.ws.client._pong(this.ws.client._pingTimestamp); this.ws.client._pong(this.ws.client._pingTimestamp);
this.ws.lastHeartbeatAck = true; this.ws.lastHeartbeatAck = true;
this.ws.client.emit('debug', 'Heartbeat acknowledged'); this.ws.client.emit('debug', 'Heartbeat acknowledged');
} } else if (packet.op === Constants.OPCodes.HEARTBEAT) {
if (packet.op === Constants.OPCodes.HEARTBEAT) {
this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT }); this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT });
this.ws.client.emit('debug', 'Received gateway heartbeat!'); this.ws.client.emit('debug', 'Received gateway heartbeat');
} }
if (this.ws.status === Constants.Status.RECONNECTING) { if (this.ws.status === Constants.Status.RECONNECTING) {