reactpy icon indicating copy to clipboard operation
reactpy copied to clipboard

Use Library For Reconnecting Websocket

Open rmorshea opened this issue 2 years ago • 4 comments
trafficstars

Current Situation

Currently we implement our own reconnecting webscoket which is deficient in one way I do know, and probably others I'm unaware of. The one I know, is that we don't stop trying to reconnect after the connection is closed due to an error. Keeping track of how to respond in the case of each error code isn't something we should have to deal with. We should just use a library.

Proposed Actions

Use https://github.com/pladaria/reconnecting-websocket

rmorshea avatar Jun 12 '23 04:06 rmorshea

Related issue: #525

Archmonger avatar Jun 14 '23 08:06 Archmonger

Related: https://github.com/reactive-python/reactpy/discussions/1098#discussioncomment-6442720

rmorshea avatar Jul 15 '23 16:07 rmorshea

I think I'm going to try deploying on GCP and will prioritize this if I think this will make it possible/easier to do so. A lot of people seem to be trying out ReactPy that way.

rmorshea avatar Jul 15 '23 16:07 rmorshea

I ended up developing a robust reconnecting websocket within ReactPy-Django that can be ported over to ReactPy core identically.

The websocket can be configured within Python via settings.

Archmonger avatar Feb 23 '24 09:02 Archmonger