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

This commit is contained in:
Ludovic Marcotte committed 2016-09-29 13:00:48 -04:00
1 parent c317ae964d
commit 5db9f40f6a
2 files changed
+19 -3

No files matched your search

+9 -1
View File
@@ -2355,8 +2355,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;
}
}