Revert "Incremental fast error backoff"

This reverts commit cf82fa02d5.
pull/185/head
M66B 4 years ago
parent 1dcc7d2c03
commit 25944d1cb6

@ -4076,8 +4076,8 @@ class Core {
return networkState; return networkState;
} }
void setBackoff(int seconds) { void setBackoff(int value) {
this.backoff = seconds; this.backoff = value;
} }
int getBackoff() { int getBackoff() {

@ -1555,13 +1555,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
EntityLog.log(ServiceSynchronize.this, EntityLog.log(ServiceSynchronize.this,
account.name + " fast errors=" + errors + account.name + " fast errors=" + errors +
" last connected: " + new Date(account.last_connected)); " last connected: " + new Date(account.last_connected));
if (errors >= FAST_ERROR_COUNT) { if (errors >= FAST_ERROR_COUNT)
int scale = errors - FAST_ERROR_COUNT + 1; state.setBackoff(CONNECT_BACKOFF_AlARM_START * 60);
int backoff = Math.max(CONNECT_BACKOFF_AlARM_START * scale, CONNECT_BACKOFF_AlARM_MAX);
EntityLog.log(ServiceSynchronize.this,
account.name + " fast error backoff=" + backoff);
state.setBackoff(backoff * 60);
}
} }
// Report account connection error // Report account connection error

Loading…
Cancel
Save