Skip async errors for inactive sessions

This commit is contained in:
M66B
2020-09-21 09:50:43 +02:00
parent ed63d035ee
commit 26d2b86eca
2 changed files with 18 additions and 3 deletions

View File

@@ -1543,6 +1543,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
Log.i(account.name + " done state=" + state);
} catch (Throwable ex) {
state.setActive(false);
Log.e(account.name, ex);
EntityLog.log(
ServiceSynchronize.this,
@@ -1587,6 +1589,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
}
}
} finally {
state.setActive(false);
// Update state
EntityLog.log(this, account.name + " closing");
db.account().setAccountState(account.id, "closing");