1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

Revert "Skip stopped orphan threads"

This reverts commit 5c58d3e314.
This commit is contained in:
M66B 2022-04-03 20:46:23 +02:00
parent b4b7233b6c
commit f10c89dbea

View file

@ -1388,7 +1388,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
state.setBackoff(CONNECT_BACKOFF_START);
if (account.backoff_until != null)
db.account().setAccountBackoff(account.id, null);
while (state.isRunning()) {
while (state.isRunning() && currentThread.equals(accountThread)) {
state.reset();
Log.i(account.name + " run thread=" + currentThread);
@ -2476,11 +2476,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
accountThread = db.account().getAccountThread(account.id);
}
if (!currentThread.equals(accountThread) && accountThread != null) {
String msg = account.name + " orphan thread id=" + currentThread + "/" + accountThread;
EntityLog.log(this, msg);
Log.e(msg);
}
if (!currentThread.equals(accountThread) && accountThread != null)
Log.e(account.name + " orphan thread id=" + currentThread + "/" + accountThread);
} finally {
EntityLog.log(this, EntityLog.Type.Account, account,
account.name + " stopped running=" + state.isRunning());