Fix issue cancelling Provider reconnection loop while a connection job was running

This commit is contained in:
Dominion
2023-05-26 15:33:12 -04:00
parent 41702d90b6
commit a84abee4aa
@@ -312,16 +312,18 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
await jobManager.WaitForJobCompletion(job, null, cancellationToken, default);
}
}
catch (OperationCanceledException)
catch (OperationCanceledException e)
{
break;
Logger.LogTrace(e, "ReconnectionLoop cancelled");
}
catch (Exception e)
{
Logger.LogError(e, "Error reconnecting!");
}
}
while (true);
while (!cancellationToken.IsCancellationRequested);
Logger.LogTrace("ReconnectionLoop exiting...");
}
}
}