SignalR Reconnect documentation
We need to provide a sample and some guidance for reconnecting SignalR clients when they disconnect. See https://github.com/davidfowl/UT3/blob/dac409886c1bb7aec7c150b74d4ce9a3e246f03c/UTT/wwwroot/js/utt.js#L141-L153 for an example. The general idea is that you need to reconnect if 1) connection.start fails or 2) connection.onclose fires.
Reconnection should be limited to only a set number of retries so that the application doesn't keep trying to reconnect a broken connection forever.
@anurse Add this to the clients docs?
Yes
I actually think this would be best as a new document: "Connection reliability in SignalR". We want to talk about:
- How to reconnect
- Reconnect backoff (trying to avoid reconnect storms by having the client reconnect at some random interval)
- Restoring state (groups, other metadata)
- Tracking a "logical" connection across different "physical" connections (session IDs, etc.)
Any news on this article?
@bradygaster can you assign someone to do this?
@Rick-Anderson assigning the new-and-awesome SignalR label so we can triage these during our regular team triage.
closing this as a duplicate of #9280, which would represent a superset of the desires of this particular issue.