Prevent race condition

pull/194/merge
M66B 3 years ago
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…
Cancel
Save