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(); };