fix: Improve media_query retry behavior (#2603)

This commit is contained in:
Dermot Duffy
2026-07-23 22:19:17 -07:00
committed by GitHub
parent 6817d27c91
commit 54f75beb9d
10 changed files with 302 additions and 16 deletions
@@ -187,9 +187,21 @@ export class IssueManager {
private _scheduleRetryIfNeeded(): void {
if (!this._stateManager.needsRetry()) {
// No issue still has a failing problem, so reset the backoff: a future
// failure should start again from the base delay.
this._retryTimer.reset();
return;
}
if (!this._stateManager.canRetryNow()) {
// An issue still has a failing problem but cannot retry right now. Cancel
// the pending timer so it does not fire a retry the issue cannot take --
// but do not reset(), which is reserved for the resolved case above.
// Consequently no retry is scheduled here; scheduling resumes on a later
// evaluate() (any condition-state change re-runs this), once the issue
// reports it can retry again or has resolved.
this._retryTimer.cancel();
return;
}
if (this._retryTimer.isRunning()) {
return;
}