Ignore QUIC exceptions (#2800)

* Ignore QUIC exceptions

See https://github.com/dotnet/runtime/issues/80111

* Update madness

* No i jaki jest twój problem ja się pytam
This commit is contained in:
Łukasz Domeradzki
2023-01-13 10:40:37 +01:00
committed by GitHub
parent 39650c6a4d
commit 0261076021
2 changed files with 9 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
// Copyright 2015-2023 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,6 +43,9 @@ using Newtonsoft.Json;
using NLog;
using NLog.Targets;
using SteamKit2;
#if !NETFRAMEWORK
using System.Net.Quic;
#endif
namespace ArchiSteamFarm;
@@ -539,7 +542,10 @@ internal static class Program {
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();

View File

@@ -56,6 +56,7 @@
<Using Include="JustArchiNET.Madness.HttpRequestExceptionMadness.HttpRequestException" Alias="HttpRequestException" />
<Using Include="JustArchiNET.Madness.OperatingSystemMadness.OperatingSystem" Alias="OperatingSystem" />
<Using Include="JustArchiNET.Madness.PathMadness.Path" Alias="Path" />
<Using Include="JustArchiNET.Madness.QuicExceptionMadness.QuicException" Alias="QuicException" />
<Using Include="JustArchiNET.Madness.RandomMadness.Random" Alias="Random" />
<Using Include="JustArchiNET.Madness.SHA256Madness.SHA256" Alias="SHA256" />
<Using Include="JustArchiNET.Madness.SHA512Madness.SHA512" Alias="SHA512" />