From eaf857535d3d39e30e7b5d1993463fe3fe3ce326 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 11 Feb 2020 14:56:22 +0100 Subject: [PATCH] Prevent reconnects --- app/src/main/java/eu/faircode/email/Core.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index f55c5c4ffc..34cf93ae05 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -30,6 +30,7 @@ import android.database.sqlite.SQLiteConstraintException; import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.os.OperationCanceledException; import android.os.SystemClock; import android.text.TextUtils; import android.util.Pair; @@ -386,8 +387,6 @@ class Core { Log.e(folder.name, ex); EntityLog.log(context, folder.name + " " + Log.formatThrowable(ex, false)); - state.error(ex); - if (similar.size() > 0) { // Retry individually group = false; @@ -482,10 +481,9 @@ class Core { } } - if (state.isRunning() && state.isRecoverable() && ifolder.isOpen()) - for (TupleOperationEx op : ops) - Log.e("Operation=" + op.name + " error=" + op.error); - + // Check account/folder + if (ops.size() > 0) + state.error(new OperationCanceledException()); } finally { Log.i(folder.name + " end process state=" + state); }