Skip to content

Commit

Permalink
Ignore unobserved HttpIOException
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Oct 4, 2024
1 parent 4cc1689 commit d074f47
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ArchiSteamFarm/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Quic;
using System.Reflection;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -532,8 +533,12 @@ private static async void OnUnobservedTaskException(object? sender, UnobservedTa
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);
}

Expand Down

0 comments on commit d074f47

Please sign in to comment.