From d155f93a59372ab783c975e21e8f53bce046492d Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 1 Nov 2020 09:15:41 +0100 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index c11b947c6e..df4d2e9f4f 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1710,9 +1710,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences // Check for fast successive server, connectivity, etc failures long fail_threshold = account.poll_interval * 60 * 1000L * FAST_FAIL_THRESHOLD / 100; long was_connected = (account.last_connected == null ? 0 : now - account.last_connected); - if (was_connected < fail_threshold) { - if (state.getBackoff() == CONNECT_BACKOFF_START && - !Helper.isCharging(this)) { + if (was_connected < fail_threshold && !Helper.isCharging(this)) { + if (state.getBackoff() == CONNECT_BACKOFF_START) { fast_fails++; if (fast_fails == 1) first_fail = now;