minor fixes

This commit is contained in:
Amish Shah
2016-12-23 14:37:35 +00:00
parent b518437f52
commit 74ef0b2e14

View File

@@ -210,12 +210,13 @@ class WebSocketManager extends EventEmitter {
/** /**
* Run whenever the connection to the gateway is closed, it will try to reconnect the client. * Run whenever the connection to the gateway is closed, it will try to reconnect the client.
* @param {Object} event The received websocket data * @param {CloseEvent} event The WebSocket close event
*/ */
eventClose(event) { eventClose(event) {
this.emit('close', event); this.emit('close', event);
this.client.clearInterval(this.client.manager.heartbeatInterval); this.client.clearInterval(this.client.manager.heartbeatInterval);
this.status = Constants.Status.DISCONNECTED; this.status = Constants.Status.DISCONNECTED;
this._queue = [];
/** /**
* Emitted whenever the client websocket is disconnected * Emitted whenever the client websocket is disconnected
* @event Client#disconnect * @event Client#disconnect