Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/client / reconnect / computeBackoffMs
Function: computeBackoffMs()
ts
function computeBackoffMs(attempt, policy?): number | null;Defined in: packages/client/src/reconnect.ts:44
Compute the number of milliseconds to sleep before the attempt-th reconnect (1-indexed). Returns null when the policy has been exhausted (attempt > maxAttempts).
Parameters
| Parameter | Type |
|---|---|
attempt | number |
policy | BackoffPolicy |
Returns
number | null