Prevent runaway looping if database connection is lost: re-establish connection to database before retrying quuery/execute.

This commit is contained in:
Richard Frith-Macdonald 2020-09-02 14:44:44 +01:00
parent 267987d01c
commit a8f405c563

View file

@ -2909,9 +2909,10 @@ static int poolConnections = 0;
{
NSLog(@"Will retry after: %@", localException);
}
[self connect];
}
}
if (done == YES)
if (done)
{
[lock unlock];
[localException raise];
@ -2987,9 +2988,10 @@ static int poolConnections = 0;
{
NSLog(@"Will retry after: %@", localException);
}
[self connect];
}
}
if (YES == done)
if (done)
{
[lock unlock];
[localException raise];