Fixed crash

This commit is contained in:
M66B 2022-01-23 07:47:53 +01:00
parent 7c2ac8c31d
commit 57aa32e883
1 changed files with 3 additions and 2 deletions

View File

@ -568,6 +568,8 @@ class Core {
continue;
}
long attachments = (op.message == null ? 0 : db.attachment().countAttachments(op.message));
if (op.tries >= TOTAL_RETRY_MAX ||
ex instanceof OutOfMemoryError ||
ex instanceof FileNotFoundException ||
@ -584,8 +586,7 @@ class Core {
EntityOperation.HEADERS.equals(op.name) ||
EntityOperation.RAW.equals(op.name) ||
EntityOperation.ATTACHMENT.equals(op.name) ||
((op.tries >= LOCAL_RETRY_MAX ||
db.attachment().countAttachments(op.message) > 0) &&
((op.tries >= LOCAL_RETRY_MAX || attachments > 0) &&
EntityOperation.ADD.equals(op.name) &&
EntityFolder.DRAFTS.equals(folder.type)) ||
(op.tries >= LOCAL_RETRY_MAX &&