We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BackoffMachine
Future<void> wait() async { final bound = _minDuration(maxBound, firstBound * pow(base, _waitsCompleted));
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Unsupported operation: Infinity or NaN toInt #0 double.round (dart:core-patch/double.dart) #1 Duration.* (dart:core/duration.dart:213:56) #2 BackoffMachine.wait (package:zulip/api/backoff.dart:87:43) #3 UpdateMachine._registerQueueWithRetry (package:zulip/model/store.dart:930:53) <asynchronous suspension> #4 UpdateMachine.load (package:zulip/model/store.dart:875:29) <asynchronous suspension> #5 LiveGlobalStore.doLoadPerAccount (package:zulip/model/store.dart:816:27)
What might have happened here is that _waitsCompleted gets to a large enough value that pow(base, _waitsCompleted) becomes either infinity or NaN.
_waitsCompleted
pow(base, _waitsCompleted)
Proposed fix by Greg:
CZO discussion
The text was updated successfully, but these errors were encountered:
hi @PIG208, i will love contribute to this issue, if it is still open
Sorry, something went wrong.
Hi @PIG208 I would like to work on this issue. Can you please assign it to me? I have set up and corrected the code.
My Code: Fixes incorrect backoff logic – Now, _currentBound correctly increases exponentially. Prevents exceeding maxBound – Ensures we don’t wait longer than necessary. Improves reliability – Makes sure backoff logic works consistently across retries.
Successfully merging a pull request may close this issue.
What might have happened here is that
_waitsCompleted
gets to a large enough value thatpow(base, _waitsCompleted)
becomes either infinity or NaN.Proposed fix by Greg:
CZO discussion
The text was updated successfully, but these errors were encountered: