Type Alias: ReconnectOptions
ReconnectOptions =
object
Defined in: src/channel/ws/ws_0_10.ts:72
Options for configuring the automatic reconnection behavior of the WebSocketChannel.
Properties
retries?
optionalretries?:number
Defined in: src/channel/ws/ws_0_10.ts:77
The number of retries to attempt before giving up.
Default
5
delay?
optionaldelay?:number
Defined in: src/channel/ws/ws_0_10.ts:82
The initial delay in milliseconds before the first retry.
Default
2000
exponential?
optionalexponential?:number|boolean
Defined in: src/channel/ws/ws_0_10.ts:87
Whether to use the exponential backoff (delay being doubled for each subsequent retry).
Default
true
stableConnectionThreshold?
optionalstableConnectionThreshold?:number
Defined in: src/channel/ws/ws_0_10.ts:95
The minimum time in milliseconds a reconnected connection must stay open before it is considered stable and the retry counter is reset. This prevents a gateway that accepts the connection then immediately drops it (a "flapping" connection) from resetting the counter on every cycle and reconnecting forever.
Default
5000