Skip to content

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

ParameterType
attemptnumber
policyBackoffPolicy

Returns

number | null

Stable