How can a SignalR JavaScript client detect when a connection with the server is lost?
The provided answers will no longer work. This is the new way to stop/disconnect connections.
myHub.stop().then(() => { alert('Server has disconnected'); });