Skip to content

Commit

Permalink
Handle _client null in heartbeat thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Crotalus committed Jul 29, 2024
1 parent 5838807 commit ca523d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Faforever.Qai.Irc/QaIrc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ private void HeartbeatThread()
{
while (true)
{
if (!_client.IsConnected)
if (_client == null || !_client.IsConnected)
{
_logger.LogDebug("Client is not connected");
if (!connecting)
if (_client == null || !connecting)
{
_logger.LogInformation("Attempting to reconnect");
TryReconnect();
Expand Down

0 comments on commit ca523d1

Please sign in to comment.