Small improvement

This commit is contained in:
M66B 2020-11-14 07:55:26 +01:00
parent 36a6c5a7a4
commit d50357aae1
1 changed files with 5 additions and 1 deletions

View File

@ -929,6 +929,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
long first_fail = 0;
Throwable last_fail = null;
state.setBackoff(CONNECT_BACKOFF_START);
if (account.backoff_until != null)
db.account().setAccountBackoff(account.id, null);
while (state.isRunning() &&
currentThread != null && currentThread.equals(thread)) {
state.reset();
@ -2043,8 +2045,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
db.beginTransaction();
// Reset accounts
for (EntityAccount account : db.account().getAccounts())
for (EntityAccount account : db.account().getAccounts()) {
db.account().setAccountState(account.id, null);
db.account().setAccountBackoff(account.id, null);
}
// reset folders
for (EntityFolder folder : db.folder().getFolders()) {