I want to implement the feature to properly shut down all SignalR hubs before shutting down the server, to roll out a new application version.
I want the REST API to finish all currently managed requests but not to accept new requests. That's already implemented.
Also, I want to shut down all hubs. The problem is that a REST requests connection is closed when it's done, so it's easy to determine if there are still requests, that have to be finished. But a Hub connection is always active unless it's closed on purpose or something went wrong.
So I want to shut down the hub if no data is currently transmitted. Is there a way to check for this information?