reactpy icon indicating copy to clipboard operation
reactpy copied to clipboard

Improve Reconnecting WS Configurability

Open Archmonger opened this issue 4 years ago • 0 comments

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...

Archmonger avatar Nov 01 '21 08:11 Archmonger