From f785fa120494f0bb5f8360c7f7e8da9bda4b7437 Mon Sep 17 00:00:00 2001 From: spiral Date: Wed, 29 Sep 2021 21:51:54 -0400 Subject: [PATCH] feat: add HttpRequestException to IsOurProblem --- PluralKit.Bot/Utils/MiscUtils.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Utils/MiscUtils.cs b/PluralKit.Bot/Utils/MiscUtils.cs index 11e1a2f0..060531ac 100644 --- a/PluralKit.Bot/Utils/MiscUtils.cs +++ b/PluralKit.Bot/Utils/MiscUtils.cs @@ -1,6 +1,6 @@ using System; using System.Linq; -using System.Collections.Generic; +using System.Net.Http; using System.Net.Sockets; using System.Threading.Tasks; @@ -56,6 +56,9 @@ namespace PluralKit.Bot // Sometimes Discord just times everything out. if (e is TimeoutException) return false; + // HTTP/2 streams are complicated and break sometimes. + if (e is HttpRequestException) return false; + // Ignore "Database is shutting down" error if (e is PostgresException pe && pe.SqlState == "57P03") return false;