From 8b3945c347680e91bed04bcce2cb46dc58b9754d Mon Sep 17 00:00:00 2001 From: Archi Date: Thu, 12 Jan 2023 02:31:45 +0100 Subject: [PATCH] Ignore QUIC exceptions See https://github.com/dotnet/runtime/issues/80111 --- ArchiSteamFarm/Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 7385f8aa5b38c..dc09891a629ac 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -26,6 +26,7 @@ using System.Globalization; using System.IO; using System.Linq; +using System.Net.Quic; using System.Reflection; using System.Runtime.InteropServices; using System.Text; @@ -539,7 +540,10 @@ private static async void OnUnobservedTaskException(object? sender, UnobservedTa ArgumentNullException.ThrowIfNull(e); ArgumentNullException.ThrowIfNull(e.Exception); - await ASF.ArchiLogger.LogFatalException(e.Exception).ConfigureAwait(false); + // TODO: Remove conditionally ignoring QuicException once https://github.com/dotnet/runtime/issues/80111 is resolved + if (e.Exception.InnerExceptions.All(static exception => exception is not QuicException)) { + await ASF.ArchiLogger.LogFatalException(e.Exception).ConfigureAwait(false); + } // Normally we should abort the application, but due to the fact that unobserved exceptions do not have to do that, it's a better idea to log it and try to continue e.SetObserved();