Linear backoff: 1 and 5 min

pull/207/head
M66B 3 years ago
parent 929f9b4f91
commit a99dd7cd17

@ -3448,10 +3448,11 @@ FairEmail will retry one time after waiting 8 seconds while keeping the device a
If this fails, FairEmail will schedule an alarm to retry after 5, 15, 30 and eventually every 60 minutes and let the device sleep (=no battery usage). If this fails, FairEmail will schedule an alarm to retry after 5, 15, 30 and eventually every 60 minutes and let the device sleep (=no battery usage).
By temporarily enabling debug mode in the miscellaneous settings, you can disable this logarithmic back-off scheme (since version 1.1855). By temporarily enabling debug mode in the miscellaneous settings, you can disable this logarithmic back-off scheme (since version 1.1855).
This will result in using a linear back-off scheme, which means that after each successive failure the waiting time will be increased by 1 minute up to 60 minutes. This will result in using a linear back-off scheme, which means that after each successive failure the waiting time will be
increased by 1 minute the first 5 minutes and thereafter by 5 minutes up to 60 minutes.
Note that [Android doze mode](https://developer.android.com/training/monitoring-device-state/doze-standby) Note that [Android doze mode](https://developer.android.com/training/monitoring-device-state/doze-standby)
does not allow to wake the device earlier than after 15 minutes when doze mode is enabled. does not allow to wake the device earlier than after 15 minutes when doze mode is active.
*Force sync* in the three-dots menu of the unified inbox can be used to let FairEmail attempt to reconnect without waiting. *Force sync* in the three-dots menu of the unified inbox can be used to let FairEmail attempt to reconnect without waiting.

@ -2391,7 +2391,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
} }
} else { } else {
// Linear back-off // Linear back-off
int b = backoff + 60; int b = backoff + (backoff < CONNECT_BACKOFF_INTERMEDIATE * 60 ? 60 : 5 * 60);
if (b > CONNECT_BACKOFF_ALARM_MAX * 60) if (b > CONNECT_BACKOFF_ALARM_MAX * 60)
b = CONNECT_BACKOFF_ALARM_MAX * 60; b = CONNECT_BACKOFF_ALARM_MAX * 60;
state.setBackoff(b); state.setBackoff(b);

Loading…
Cancel
Save