Path
packages/core/src/v3/apps/backoff.ts
Description
The ExponentialBackoff helper class exposes an execute() method that handles retrying asynchronous callbacks. While execute() correctly keeps track of the actual wall-clock time spent in the callback using a local elapsedMs variable, this variable is never used to enforce the timeout boundary.
Instead, the retry generator (retryAsync) calculates the elapsed duration by only summing up the sleep delays:
elapsed += delay;
if (elapsed > this.#maxElapsed) {
break;
}
Path
packages/core/src/v3/apps/backoff.ts
Description
The
ExponentialBackoffhelper class exposes anexecute()method that handles retrying asynchronous callbacks. Whileexecute()correctly keeps track of the actual wall-clock time spent in the callback using a localelapsedMsvariable, this variable is never used to enforce the timeout boundary.Instead, the retry generator (
retryAsync) calculates the elapsed duration by only summing up the sleep delays: