From 2d82c90edd28349707e090dfd8fc5838fd172246 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 9 Dec 2019 13:14:12 +0100 Subject: [PATCH] Small improvement --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index e86af3a4ee..c8c4f1c7db 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1224,8 +1224,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences if (folder.synchronize && !folder.poll && mapFolders.get(folder) != null) { db.folder().setFolderState(folder.id, "closing"); try { - mapFolders.get(folder).close(); - } catch (MessagingException ex) { + if (iservice.getStore().isConnected()) + mapFolders.get(folder).close(); + } catch (Throwable ex) { Log.w(ex); } finally { db.folder().setFolderState(folder.id, null);