Tune startup retry loop - try 50 times, with a 100ms pause between each attempt.

REL-1_X
Dave Page 2017-06-11 14:38:22 +01:00
parent ef4b8e8c1c
commit dea850b503
1 changed files with 4 additions and 2 deletions

View File

@ -333,7 +333,7 @@ int main(int argc, char * argv[])
// Now the server should be up, we'll attempt to connect and get a response. // Now the server should be up, we'll attempt to connect and get a response.
// We'll retry in a loop a few time before aborting if necessary. // We'll retry in a loop a few time before aborting if necessary.
int attempt = 0; int attempt = 0;
while (attempt++ < 30) while (attempt++ < 50)
{ {
bool alive = PingServer(QUrl(appServerUrl)); bool alive = PingServer(QUrl(appServerUrl));
@ -342,7 +342,7 @@ int main(int argc, char * argv[])
break; break;
} }
if (attempt == 30) if (attempt == 50)
{ {
splash->finish(NULL); splash->finish(NULL);
QString error(QWidget::tr("The application server could not be contacted.")); QString error(QWidget::tr("The application server could not be contacted."));
@ -350,6 +350,8 @@ int main(int argc, char * argv[])
exit(1); exit(1);
} }
delay(100);
} }
// Create & show the main window // Create & show the main window