mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-19 18:35:34 +00:00
Simplification
This commit is contained in:
parent
014c052d1f
commit
d155f93a59
1 changed files with 2 additions and 3 deletions
|
@ -1710,9 +1710,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
// Check for fast successive server, connectivity, etc failures
|
// Check for fast successive server, connectivity, etc failures
|
||||||
long fail_threshold = account.poll_interval * 60 * 1000L * FAST_FAIL_THRESHOLD / 100;
|
long fail_threshold = account.poll_interval * 60 * 1000L * FAST_FAIL_THRESHOLD / 100;
|
||||||
long was_connected = (account.last_connected == null ? 0 : now - account.last_connected);
|
long was_connected = (account.last_connected == null ? 0 : now - account.last_connected);
|
||||||
if (was_connected < fail_threshold) {
|
if (was_connected < fail_threshold && !Helper.isCharging(this)) {
|
||||||
if (state.getBackoff() == CONNECT_BACKOFF_START &&
|
if (state.getBackoff() == CONNECT_BACKOFF_START) {
|
||||||
!Helper.isCharging(this)) {
|
|
||||||
fast_fails++;
|
fast_fails++;
|
||||||
if (fast_fails == 1)
|
if (fast_fails == 1)
|
||||||
first_fail = now;
|
first_fail = now;
|
||||||
|
|
Loading…
Add table
Reference in a new issue