From 3ed1230f7337cc6ccd642cc9a4e41c135c2b30fd Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 25 Sep 2020 12:47:31 +0200 Subject: [PATCH] Increased fast error time --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 22e4f01c0b..ac172bd589 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -117,8 +117,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences private static final int ACCOUNT_ERROR_AFTER = 60; // minutes private static final int ACCOUNT_ERROR_AFTER_POLL = 3; // times private static final int BACKOFF_ERROR_AFTER = 16; // seconds - private static final long FAST_ERROR_TIME = 5 * 60 * 1000L; // milliseconds + private static final long FAST_ERROR_TIME = 6 * 60 * 1000L; // milliseconds private static final int FAST_ERROR_COUNT = 3; + private static final int FAST_ERROR_BACKOFF = CONNECT_BACKOFF_AlARM_START * 2; private static final String ACTION_NEW_MESSAGE_COUNT = BuildConfig.APPLICATION_ID + ".NEW_MESSAGE_COUNT"; @@ -1566,7 +1567,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences account.name + " fast errors=" + errors + " last connected: " + new Date(account.last_connected)); if (errors >= FAST_ERROR_COUNT) - state.setBackoff(CONNECT_BACKOFF_AlARM_START * 60); + state.setBackoff(FAST_ERROR_BACKOFF * 60); } // Report account connection error