Check three times for internet connection before stopping image backup

This commit is contained in:
Martin 2016-01-07 23:11:06 +01:00
parent a7046e45fb
commit 2abb7e86bf

View File

@ -514,8 +514,21 @@ bool ImageBackup::doImage(const std::string &pLetter, const std::string &pParent
if (!internet_connection && client_main->isOnInternetConnection())
{
Server->wait(60000);
if(client_main->isOnInternetConnection())
int icount = 0;
while (icount < 4)
{
Server->wait(60000);
if (client_main->isOnInternetConnection())
{
++icount;
}
else
{
break;
}
}
if(icount>=4)
{
ServerLogger::Log(logid, "Stopped image backup because client is connected via Internet now", LL_WARNING);
goto do_image_cleanup;