reactpy
reactpy copied to clipboard
Use Library For Reconnecting Websocket
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
Related issue: #525
Related: https://github.com/reactive-python/reactpy/discussions/1098#discussioncomment-6442720
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.
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.