From acd3493720de9f06e25b42416d76868db407a826 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 21 Oct 2019 18:19:11 +0200 Subject: [PATCH] Check if folder open before idle Refs eclipse-ee4j/mail#404 --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index e3f95b7af0..1a41736e3c 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1004,7 +1004,7 @@ public class ServiceSynchronize extends ServiceBase { 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); }