This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user