Skip to main content

Function: calculateBackoffDelayMs()

function calculateBackoffDelayMs(options: BackoffDelayOptions): number;

Defined in: shared/utils/backoff.ts:73

Computes a retry delay in milliseconds.

Parametersโ€‹

optionsโ€‹

BackoffDelayOptions

Returnsโ€‹

number

Remarksโ€‹

  • Negative / non-finite inputs are treated as 0 so retry helpers never schedule negative timeouts or throw while handling an already-failing operation.
  • Finite values that exceed the maximum safe JavaScript timer delay are capped so retry loops do not accidentally schedule immediate timers.