mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-06-16 09:15:19 -04:00
Dispose and fully restart the WS client if it's choking due to TaskCanceledException
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user