From c953503472c9e62a5a09a738e1c4c857e48eee0e Mon Sep 17 00:00:00 2001 From: apirila Date: Fri, 5 Oct 2018 19:19:16 +0300 Subject: [PATCH] Fix infinite loop in error handling. Fix #329 --- lib/WebSocketConnection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebSocketConnection.js b/lib/WebSocketConnection.js index 9f2750cc..c14a24ea 100644 --- a/lib/WebSocketConnection.js +++ b/lib/WebSocketConnection.js @@ -348,7 +348,7 @@ WebSocketConnection.prototype.handleSocketError = function(error) { if (utils.eventEmitterListenerCount(this, 'error') > 0) { this.emit('error', error); } - this.socket.destroy(error); + this.socket.destroy(); this._debug.printOutput(); };