you should add a broadcast message to clients, telling them to disconnect, perhaps with time to wait before reconnect..
SignalR Hub - Check for incomming or outgoing data
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?
2 answers
Sort by: Most helpful
-
-
Jose Zero 576 Reputation points
2022-03-20T12:38:11.627+00:00 This article might help you or at least give an starting point
tracking-online-users-with-signalr