1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Fixed max retry count sending

This commit is contained in:
M66B 2024-03-07 11:58:15 +01:00
parent e05cc5c7ae
commit cb08193c42

View file

@ -464,8 +464,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
Log.e(outbox.name, ex); Log.e(outbox.name, ex);
EntityLog.log(this, "Send " + Log.formatThrowable(ex, false)); EntityLog.log(this, "Send " + Log.formatThrowable(ex, false));
boolean unrecoverable = (op.tries > RETRY_MAX || boolean unrecoverable = (ex instanceof OutOfMemoryError ||
ex instanceof OutOfMemoryError ||
ex instanceof MessageRemovedException || ex instanceof MessageRemovedException ||
ex instanceof FileNotFoundException || ex instanceof FileNotFoundException ||
(ex instanceof AuthenticationFailedException && !ConnectionHelper.isIoError(ex)) || (ex instanceof AuthenticationFailedException && !ConnectionHelper.isIoError(ex)) ||
@ -525,7 +524,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
} }
} }
if (unrecoverable) { if (op.tries >= RETRY_MAX || unrecoverable) {
Log.w("Unrecoverable"); Log.w("Unrecoverable");
db.operation().deleteOperation(op.id); db.operation().deleteOperation(op.id);
ops.remove(op); ops.remove(op);