diff --git a/components/connection_protocols/websocket.js b/components/connection_protocols/websocket.js index 9831c40b..3a7a7f3d 100644 --- a/components/connection_protocols/websocket.js +++ b/components/connection_protocols/websocket.js @@ -99,6 +99,11 @@ class WebSocketConnection extends BaseConnection { this.stream.removeAllListeners(); this.stream.on('error', () => { }); + + this.stream.disconnect(); + this._disconnected = true; + + return; } this.stream.disconnect();