1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 17:27:00 +00:00

Increased fast error time

This commit is contained in:
M66B 2020-09-25 12:47:31 +02:00
parent 5819846b19
commit 3ed1230f73

View file

@ -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