From 0d248e9265b8459d27d0da3bfa1be62b0656b8b4 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 18 Feb 2022 10:12:08 +0100 Subject: [PATCH] Cancel SYNC when not I/O error --- app/src/main/java/eu/faircode/email/Core.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 08886a3378..1a2a3607da 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -596,7 +596,8 @@ class Core { EntityFolder.DRAFTS.equals(folder.type)) || (op.tries >= LOCAL_RETRY_MAX && EntityOperation.SYNC.equals(op.name) && - account.protocol == EntityAccount.TYPE_POP)) { + (account.protocol == EntityAccount.TYPE_POP || + !ConnectionHelper.isIoError(ex)))) { // com.sun.mail.iap.BadCommandException: BAD [TOOBIG] Message too large // com.sun.mail.iap.CommandFailedException: NO [CANNOT] Cannot APPEND to a SPAM folder // com.sun.mail.iap.CommandFailedException: NO [ALERT] Cannot MOVE messages out of the Drafts folder