davidje13 / Refacto

A remote retro facilitation tool.
https://retro.davidje13.com/
GNU General Public License v3.0
23 stars 6 forks source link

Auto reconnect WebSockets on close #3

Open davidje13 opened 5 years ago

davidje13 commented 5 years ago

Close events are currently detected, but ignored (except for cancelling keepalive pings)

The client should attempt to automatically reconnect if the connection is lost unintentionally. This should use retry logic with an increasing delay to avoid self-DDoS.

If connection is lost for several seconds without reconnecting, a non-intrusive message should be displayed to the user.

davidje13 commented 2 years ago

To prevent missed or duplicated messages after reconnection, the server will need to keep track of which messages it has already handled;

Client UUIDs are known only to the server and the client, not other clients. It may also be necessary to limit the maximum number of UUIDs tracked by the server (perhaps including a timestamp in each entry and removing the oldest to maintain a maximum count, or more simply by keeping an ordered list in most-recently-used order)

davidje13 commented 1 month ago

For simplicity, my preferred approach here has changed: