Closed
Description
Current Situation
Currently the configuration for reconnecting WS is fairly limited.
Proposed Changes
We can potentially add settings for MAX_TIMEOUT
, MAX_RETRIES
, and/or RECONNECT_INTERVAL
.
Alternatively, allow the user to define his own JavaScript WS reconnection function.
Implementation Details
From @rmorshea
I'd actually like to modify how reconnections happen so its more configurable. It should accept a callback that receives the last delay, and the total elapsed time as its arguments and returns the next delay.It should probably be even a bit more general in that, there should be a way to hook into the full lifecycle of the connection:
- before initial connection
- connected
- disconnected
- closed
- etc...