(fix) make sure we don't sleep for too long when EAS processes need interruption

This commit is contained in:
Ludovic Marcotte
2016-09-29 13:07:29 -04:00
parent 686b32d78b
commit 81d3d3bc5b
2 changed files with 19 additions and 3 deletions
+9 -1
View File
@@ -2393,8 +2393,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}
else
{
int t;
[self logWithFormat: @"Sleeping %d seconds while detecting changes in Sync...", internalInterval-total_sleep];
sleep(sleepInterval);
for (t = 0; t < sleepInterval; t++)
{
if ([self easShouldTerminate])
break;
sleep(1);
}
total_sleep += sleepInterval;
}
}