ReconnectOptions
Defined in: packages/ws/src/reconnect.ts:87
Configuration for GatewayReconnect.
Properties
Section titled “Properties”baseDelay
Section titled “baseDelay”baseDelay:
number
Defined in: packages/ws/src/reconnect.ts:93
Delay for the first attempt, doubled per attempt.
enabled
Section titled “enabled”enabled:
boolean
Defined in: packages/ws/src/reconnect.ts:89
Whether automatic reconnect is permitted at all.
maxAttempts
Section titled “maxAttempts”maxAttempts:
number
Defined in: packages/ws/src/reconnect.ts:91
Maximum consecutive attempts before giving up.
maxDelay
Section titled “maxDelay”maxDelay:
number
Defined in: packages/ws/src/reconnect.ts:95
Ceiling for the backoff.
optionalnow?: () =>number
Defined in: packages/ws/src/reconnect.ts:103
Clock in ms; injected in tests.
Returns
Section titled “Returns”number
random?
Section titled “random?”
optionalrandom?: () =>number
Defined in: packages/ws/src/reconnect.ts:97
Randomness source for jitter; injected in tests.
Returns
Section titled “Returns”number
stormLimit?
Section titled “stormLimit?”
optionalstormLimit?:number
Defined in: packages/ws/src/reconnect.ts:99
Reconnects inside stormWindow before the link counts as unstable (default 5).
stormWindow?
Section titled “stormWindow?”
optionalstormWindow?:number
Defined in: packages/ws/src/reconnect.ts:101
The span over which reconnects are counted, in ms (default 60,000).