mirror of https://github.com/M66B/FairEmail.git
Prevent race condition
This commit is contained in:
parent
d1600ad188
commit
516da33f8c
|
@ -1331,6 +1331,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
db.account().setAccountBackoff(account.id, null);
|
db.account().setAccountBackoff(account.id, null);
|
||||||
while (state.isRunning() && currentThread.equals(accountThread)) {
|
while (state.isRunning() && currentThread.equals(accountThread)) {
|
||||||
state.reset();
|
state.reset();
|
||||||
|
if (!state.isRunning())
|
||||||
|
break;
|
||||||
Log.i(account.name + " run thread=" + currentThread);
|
Log.i(account.name + " run thread=" + currentThread);
|
||||||
|
|
||||||
final ObjectHolder<TwoStateOwner> cowner = new ObjectHolder<>();
|
final ObjectHolder<TwoStateOwner> cowner = new ObjectHolder<>();
|
||||||
|
|
Loading…
Reference in New Issue