Emit error instead of console.log

This commit is contained in:
Amish Shah
2016-08-30 14:06:11 +01:00
parent 49d525109f
commit 680ac48e3d
2 changed files with 7 additions and 2 deletions

View File

@@ -191,7 +191,12 @@ class WebSocketManager {
* @returns {null}
*/
eventError(e) {
console.log(e);
/**
* Emitted whenever the Client encounters a serious connection error
* @event Client#error
* @param {Error} error the encountered error
*/
this.client.emit('error', e);
this.tryReconnect();
}