I have a SignalR HUB that maintains an in-memory repository of the various connected clients, which contains some data that we use to process requests. Ideally, these clients will stay connected all the time.
The problem I have is when we need to push a patch to the hub, we publish it, and recycle the server. This occurs quickly enough that the clients still maintain their connection, but since the website has been recycled, the memory used by the hub has been cleared and the repository no longer exists.
Maybe this is a design flaw on my part, but is there a way to force the connections to drop when cycling the server, or should I be using something other than a simple in-memory singleton for my repository? Or am I misunderstanding what's happening here altogether?