RubenVerborgh / Solid-React-Components

Core React components for building your own Solid components and apps
https://rubenverborgh.github.io/Solid-React-Components/
MIT License
118 stars 21 forks source link

UpdateTracter to reconnect and re-subscribe on close events #29

Closed jholleran closed 4 years ago

jholleran commented 4 years ago

Motivation

UpdateTracter currently will not reconnect, and re-subscribe to resources if the websocket connection is closed unexpectedly or closed because of no recent traffic.

This would allow applications to continue to get notifications even after network connection drop issues, without having to do a full page refresh.

Proposal

Reconnect and re-subscribe on a webSocket.onclose event. This should retry a number of times with with exponential backoff.

Additional info

Another useful functionality could be to alert the app if its unable to make connect so the app could display a message to the user that its unable to connect.