Skip to content

Commit

Permalink
store: reset backoff on success
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisirhc committed Mar 13, 2024
1 parent 754f3c6 commit b954b8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/model/store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ class UpdateMachine {
assert(debugLog('Transient error polling event queue for $store: $e\n'
'Backing off, then will retry…'));
// TODO tell user if transient polling errors persist
// TODO reset to short backoff eventually
await backoffMachine.wait();
assert(debugLog('… Backoff wait complete, retrying poll.'));
continue;
Expand All @@ -716,6 +715,9 @@ class UpdateMachine {
if (events.isNotEmpty) {
lastEventId = events.last.id;
}

// On success, reset the backoff.
backoffMachine.reset();
}
}

Expand Down

0 comments on commit b954b8d

Please sign in to comment.