The question is how can SignalR JavaScript client detect when connection with server is lost?
Thanks for any reply!
Starting with SignalR v0.5.1 it works this way:
$.connection.hub.stateChanged(function (change) {
if (change.newState === $.signalR.connectionState.reconnecting) {
console.log("liveFeed is reconnecting!");
}
else if (change.newState === $.signalR.connectionState.connected) {
console.log("liveFeed is connected!");
}
});
For more details check this website:
http://weblogs.asp.net/davidfowler/archive/2012/06/10/signalr-0-5-1-released.aspx