Abort on pending operations

pull/174/head
M66B 5 years ago
parent 3b3f978965
commit 0456c85e9a

@ -485,10 +485,10 @@ class Core {
if (ops.size() == 0) if (ops.size() == 0)
state.batchCompleted(folder.id, priority, sequence); state.batchCompleted(folder.id, priority, sequence);
else // Check account/folder else // abort
state.error(new OperationCanceledException()); state.error(new OperationCanceledException());
} finally { } 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()))) "This operation is not allowed on a closed folder".equals(ex.getMessage())))
recoverable = false; recoverable = false;
if (ex instanceof OperationCanceledException)
recoverable = false;
thread.interrupt(); thread.interrupt();
yield(); yield();
} }

Loading…
Cancel
Save