Merge remote-tracking branch 'origin/master' into devel

This commit is contained in:
Jakub
2020-05-07 15:30:08 +02:00
10 changed files with 265 additions and 6 deletions

View File

@ -105,6 +105,7 @@ type Store struct {
imapUpdates chan imapBackend.Update
isSyncRunning bool
syncCooldown cooldown
addressMode addressMode
}
@ -149,6 +150,9 @@ func New(
log: l,
}
// Minimal increase is event pollInterval, doubles every failed retry up to 5 minutes.
store.syncCooldown.setExponentialWait(pollInterval, 2, 5*time.Minute)
if err = store.init(firstInit); err != nil {
l.WithError(err).Error("Could not initialise store, attempting to close")
if storeCloseErr := store.Close(); storeCloseErr != nil {