Dispose and fully restart the WS client if it's choking due to TaskCanceledException

This commit is contained in:
barelyprofessional
2026-05-31 10:31:49 -05:00
parent 17d2e0415a
commit 3ae74c0fbf
2 changed files with 14 additions and 1 deletions
+6
View File
@@ -114,6 +114,12 @@ public class ChatClient
_logger.Debug("Websocket client started!");
}
public void DisposeWsClient()
{
if (_wsClient == null) throw new WebSocketNotInitializedException();
_wsClient.Dispose();
}
public bool IsConnected()
{
return _wsClient is { IsRunning: true };