mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Fix NullReferenceException when recreating a dead Rainbet connection that died during the cookie phase
This commit is contained in:
@@ -12,7 +12,7 @@ namespace KfChatDotNetBot.Services;
|
||||
public class RainbetWs : IDisposable
|
||||
{
|
||||
private Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
private WebsocketClient _wsClient;
|
||||
private WebsocketClient? _wsClient;
|
||||
private Uri _wsUri = new("wss://socket.rainbet.com/socket.io/?EIO=4&transport=websocket");
|
||||
private int _reconnectTimeout = 30;
|
||||
private string? _proxy;
|
||||
@@ -172,7 +172,7 @@ public class RainbetWs : IDisposable
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_wsClient.Dispose();
|
||||
_wsClient?.Dispose();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user