Keep folder alive when skip polling

This commit is contained in:
M66B 2021-01-22 17:26:32 +01:00
parent c89717a5e6
commit b71f8a0246
1 changed files with 4 additions and 0 deletions

View File

@ -1688,6 +1688,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
} else {
if (folder.poll_count == 0)
EntityOperation.sync(this, folder.id, false);
else {
if (!mapFolders.get(folder).isOpen())
throw new StoreClosedException(iservice.getStore(), "NOOP " + folder.name);
}
folder.poll_count = (folder.poll_count + 1) % folder.poll_factor;
db.folder().setFolderPollCount(folder.id, folder.poll_count);
Log.i(folder.name + " poll count=" + folder.poll_count);