Skip to main content
Version: v10.0.0

ReconnectDelayType

Decides the delay in ms before the next connection attempt, or stops reconnecting with null .

attempt counts from 0 for the first retry of an outage, elapsed is the time in ms since the outage began.


Import
import { ReconnectDelayType } from "@hyper-fetch/sockets"

Preview​

type ReconnectDelayType = (data: { attempt: number; elapsed: number; reason: ConnectionLossType }) => number | null;