From 0cd747f8ffb500167800ef8aabee82859b9bcd79 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 25 Feb 2021 10:12:28 +0100 Subject: [PATCH] Revert "Simplification" This reverts commit ac41616191665e58548191a3c35e128d96856af5. --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 3ed2dcdd25..751c0dc351 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1331,13 +1331,11 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences public void run() { try { Log.i(folder.name + " start idle"); - while (state.isRunning() && state.isRecoverable()) { + while (ifolder.isOpen() && state.isRunning() && state.isRecoverable()) { Log.i(folder.name + " do idle"); ifolder.idle(false); state.activity(); } - if (BuildConfig.DEBUG) - EntityLog.log(ServiceSynchronize.this, folder.name + " end IDLE"); } catch (Throwable ex) { Log.e(folder.name, ex); EntityLog.log(