"knock, knock. who's there. discord, lol" (#1021)

This commit is contained in:
Gus Caplan
2016-12-27 06:13:57 -06:00
committed by Amish Shah
parent b79533e373
commit bac4ccead7

View File

@@ -95,6 +95,11 @@ class WebSocketPacketManager {
this.ws.client.emit('debug', 'Heartbeat acknowledged');
}
if (packet.op === Constants.OPCodes.HEARTBEAT) {
this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT_ACK });
this.ws.client.emit('debug', 'ACKed gateway heartbeat!');
}
if (this.ws.status === Constants.Status.RECONNECTING) {
this.ws.reconnecting = false;
this.ws.checkIfReady();