From 45a986cdc6ed8d879f13677e87d87309eb365227 Mon Sep 17 00:00:00 2001 From: Sadzurami Date: Mon, 14 Oct 2024 15:59:41 +0300 Subject: [PATCH] fix: fixed ws disconnected state on connection end --- components/connection_protocols/websocket.js | 5 +++++ 1 file changed, 5 insertions(+) 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();