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 @@ -763,7 +763,7 @@ class UpdateMachine {
763
763
}
764
764
765
765
void poll () async {
766
- final backoffMachine = BackoffMachine () ;
766
+ BackoffMachine ? backoffMachine;
767
767
768
768
while (true ) {
769
769
if (_debugLoopSignal != null ) {
@@ -793,20 +793,21 @@ class UpdateMachine {
793
793
'Backing off, then will retry…' ));
794
794
// TODO tell user if transient polling errors persist
795
795
// TODO reset to short backoff eventually
796
- await backoffMachine.wait ();
796
+ await ( backoffMachine ?? = BackoffMachine ()) .wait ();
797
797
assert (debugLog ('… Backoff wait complete, retrying poll.' ));
798
798
continue ;
799
799
800
800
default :
801
801
assert (debugLog ('Error polling event queue for $store : $e \n '
802
802
'Backing off and retrying even though may be hopeless…' ));
803
803
// TODO tell user on non-transient error in polling
804
- await backoffMachine.wait ();
804
+ await ( backoffMachine ?? = BackoffMachine ()) .wait ();
805
805
assert (debugLog ('… Backoff wait complete, retrying poll.' ));
806
806
continue ;
807
807
}
808
808
}
809
809
810
+ backoffMachine = null ;
810
811
store.isLoading = false ;
811
812
final events = result.events;
812
813
for (final event in events) {
You can’t perform that action at this time.
0 commit comments