I'm trying to detect when a SignalR Core connection is lost so that I can create a new one or at least warn the user.
connection.on('closed', data => {
alert('Connection Closed');
});
This seems to have no effect. The messages stop arriving but this handler isn't fired.
On a related note, where is the documentation for event handling for the new version of this library?
Use
onclose
:There's no documentation yet, but a handful of samples on GitHub.