mirror of https://github.com/M66B/FairEmail.git
Abort on pending operations
This commit is contained in:
parent
3b3f978965
commit
0456c85e9a
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue