This commit is contained in:
2022-09-10 22:14:00 +00:00
parent 628364bcaa
commit 4c9fc68ef7
2 changed files with 8 additions and 14 deletions

View File

@@ -239,20 +239,10 @@ namespace AyaNova.Util
internal static void HandleIfDatabaseUnavailableTypeException(Exception ex)
{
if (ex == null) return;
//System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
//System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
do
{
if (ex.Message.Contains("SOMESTRING"))
{
ServerGlobalOpsSettingsCache.DBAVAILABLE = true;
return;
}
ex = ex.InnerException;
//ServerGlobalOpsSettingsCache.DBAVAILABLE = true;
} while (ex != null);
if (ex.Message.Contains("transient failure") && ex.Source.Contains("PostgreSQL"))
ServerGlobalOpsSettingsCache.DBAVAILABLE = false;
}
///////////////////////////////////////////
//Verify that database exists, if not, then create it