Abort on pending operations

This commit is contained in:
M66B 2020-02-11 16:57:12 +01:00
parent 3b3f978965
commit 0456c85e9a
1 changed files with 5 additions and 2 deletions

View File

@ -485,10 +485,10 @@ class Core {
if (ops.size() == 0)
state.batchCompleted(folder.id, priority, sequence);
else // Check account/folder
else // abort
state.error(new OperationCanceledException());
} finally {
Log.i(folder.name + " end process state=" + state);
Log.i(folder.name + " end process state=" + state + " pending=" + ops.size());
}
}
@ -3398,6 +3398,9 @@ class Core {
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
recoverable = false;
if (ex instanceof OperationCanceledException)
recoverable = false;
thread.interrupt();
yield();
}