mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix: don't spam errors when postgres is restarting
This commit is contained in:
parent
6c6cb156d4
commit
ca108813b7
1 changed files with 3 additions and 0 deletions
|
|
@ -59,6 +59,9 @@ public static class MiscUtils
|
|||
// Ignore "Database is shutting down" error
|
||||
if (e is PostgresException pe && pe.SqlState == "57P03") return false;
|
||||
|
||||
// Ignore *other* "database is shutting down" error (57P01)
|
||||
if (e is PostgresException pe2 && pe2.SqlState == "57P01") return false;
|
||||
|
||||
// Ignore database timing out as well.
|
||||
if (e is NpgsqlException tpe && tpe.InnerException is TimeoutException)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue