Do not recreate OperationCanceledException

This commit is contained in:
Dominion
2023-04-30 09:40:58 -04:00
parent 0726a4840e
commit 2f4d24dda1
@@ -312,10 +312,8 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
await SendToChannel(new Snowflake(channelId));
}
catch (Exception e)
catch (Exception e) when (e is not OperationCanceledException)
{
if (e is OperationCanceledException)
cancellationToken.ThrowIfCancellationRequested();
Logger.LogWarning(e, "Error sending discord message!");
}
}