diff --git a/lib/transports/websocket.js b/lib/transports/websocket.js index f9c4b7a46..3d6c50931 100644 --- a/lib/transports/websocket.js +++ b/lib/transports/websocket.js @@ -245,6 +245,7 @@ WS.prototype.onClose = function () { WS.prototype.doClose = function () { if (typeof this.ws !== 'undefined') { + this.ws.onerror = () => {}; this.ws.close(); } };