File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -750,7 +750,7 @@ class UpdateMachine {
750
750
}
751
751
752
752
void poll () async {
753
- final backoffMachine = BackoffMachine () ;
753
+ BackoffMachine ? backoffMachine;
754
754
755
755
while (true ) {
756
756
if (_debugLoopSignal != null ) {
@@ -779,20 +779,21 @@ class UpdateMachine {
779
779
'Backing off, then will retry…' ));
780
780
// TODO tell user if transient polling errors persist
781
781
// TODO reset to short backoff eventually
782
- await backoffMachine.wait ();
782
+ await ( backoffMachine ?? = BackoffMachine ()) .wait ();
783
783
assert (debugLog ('… Backoff wait complete, retrying poll.' ));
784
784
continue ;
785
785
786
786
default :
787
787
assert (debugLog ('Error polling event queue for $store : $e \n '
788
788
'Backing off and retrying even though may be hopeless…' ));
789
789
// TODO tell user on non-transient error in polling
790
- await backoffMachine.wait ();
790
+ await ( backoffMachine ?? = BackoffMachine ()) .wait ();
791
791
assert (debugLog ('… Backoff wait complete, retrying poll.' ));
792
792
continue ;
793
793
}
794
794
}
795
795
796
+ backoffMachine = null ;
796
797
final events = result.events;
797
798
for (final event in events) {
798
799
await store.handleEvent (event);
You can’t perform that action at this time.
0 commit comments