mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Shutdown operations queue
This commit is contained in:
@@ -825,6 +825,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
}
|
||||
});
|
||||
|
||||
final ExecutorService executor =
|
||||
Helper.getBackgroundExecutor(1, "account_" + account.id);
|
||||
|
||||
final Map<EntityFolder, IMAPFolder> mapFolders = new HashMap<>();
|
||||
List<Thread> idlers = new ArrayList<>();
|
||||
try {
|
||||
@@ -944,9 +947,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
Core.onSynchronizeFolders(this, account, iservice.getStore(), state);
|
||||
|
||||
// Open synchronizing folders
|
||||
final ExecutorService executor =
|
||||
Helper.getBackgroundExecutor(1, "account_" + account.id);
|
||||
|
||||
List<EntityFolder> folders = db.folder().getFolders(account.id, false, true);
|
||||
Collections.sort(folders, new Comparator<EntityFolder>() {
|
||||
@Override
|
||||
@@ -1416,6 +1416,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
}
|
||||
});
|
||||
|
||||
executor.shutdown();
|
||||
|
||||
// Close folders
|
||||
for (EntityFolder folder : mapFolders.keySet())
|
||||
if (folder.synchronize && !folder.poll && mapFolders.get(folder) != null) {
|
||||
|
||||
Reference in New Issue
Block a user