mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-22 02:45:08 -04:00
Retry on SSL exceptions
This commit is contained in:
parent
f8dac2c9d0
commit
cc1ad8b435
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ using System.Linq;
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Threading.Tasks;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
using Polly;
|
||||
|
@ -21,7 +22,7 @@ public static class Http
|
|||
|
||||
private static bool IsRetryableException(Exception exception) =>
|
||||
exception.GetSelfAndChildren().Any(ex =>
|
||||
ex is TimeoutException or SocketException ||
|
||||
ex is TimeoutException or SocketException or AuthenticationException ||
|
||||
ex is HttpRequestException hrex && IsRetryableStatusCode(hrex.TryGetStatusCode() ?? HttpStatusCode.OK)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue