Small improvement

This commit is contained in:
M66B 2019-12-09 13:14:12 +01:00
parent 7fcb883786
commit 2d82c90edd
1 changed files with 3 additions and 2 deletions

View File

@ -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);