mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Added a feature to reconnect if the bot somehow gets stuck (either not joined to a channel or stuck in a disconnected state)
This commit is contained in:
@@ -51,6 +51,11 @@ public class ChatClient
|
||||
_wsClient.Stop(WebSocketCloseStatus.NormalClosure, "Closing websocket").Wait();
|
||||
}
|
||||
|
||||
public async Task Reconnect()
|
||||
{
|
||||
await _wsClient.Reconnect();
|
||||
}
|
||||
|
||||
private async Task CreateWsClient()
|
||||
{
|
||||
var factory = new Func<ClientWebSocket>(() =>
|
||||
|
||||
Reference in New Issue
Block a user