Let's say I have 2 hubs on my SignalR app. I'm mapping the connectionsIds -> userIds on a local cache dictionary.
Current logic is like so:
With OnConnected --> add a new "connectionId to userId" entry to the dictionary(if it doesn't exists).
With OnDisconnected --> remove that "connectionId to userId" entry from the dictionary (if it exists)
Is there any scenario that Hub1 will be disconnected while Hub2 will stay connected?
If so, my current logic is flawed as it will remove the entry from the dictionary even though Hub2 is still connected. fixing that will require me to handle 2 dictionaries for each hub.
P.S. I've looked at SignalR docs for handling connections mapping and it always seems they are using one dictionary per hub. so I want to know if it's really necessary.