From d074f47659799cb52136ca7b309cc20620c7f57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Fri, 4 Oct 2024 14:27:02 +0200 Subject: [PATCH] Ignore unobserved HttpIOException --- ArchiSteamFarm/Program.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 9f7f0b237..b1fbfcd3f 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -28,6 +28,7 @@ using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; +using System.Net.Http; using System.Net.Quic; using System.Reflection; using System.Runtime.InteropServices; @@ -532,8 +533,12 @@ internal static class Program { ArgumentNullException.ThrowIfNull(e); ArgumentNullException.ThrowIfNull(e.Exception); - // TODO: Remove conditionally ignoring QuicException once https://github.com/dotnet/runtime/issues/80111 is resolved - if ((e.Exception.InnerExceptions.Count == 0) || e.Exception.InnerExceptions.All(static exception => exception is not QuicException)) { + // TODO: Remove conditionally ignoring exceptions once reports are resolved + // https://github.com/dotnet/runtime/issues/80111 + // https://github.com/dotnet/runtime/issues/102772 + bool ignored = e.Exception.InnerExceptions.Any(static exception => exception is HttpIOException or QuicException); + + if (!ignored) { await ASF.ArchiLogger.LogFatalException(e.Exception).ConfigureAwait(false); }