Reputation: 1381
In my signalR application, we need to check if a user has disconnected which seems to work fine, however it does not work if the user is disconnected on the network level such as an internet disconnection.
I'm trying to use the $.connection.hub.stateChanged(...);
event however it's not being hit when I either disconnect or reconnect to the internet.
When I remove the connection from the internet, the connection doesn't seem to be timing out and the disconnect task isn't being hit server side.
Upvotes: 1
Views: 1241
Reputation: 18311
In 0.5.3 the client cannot detect this type of disconnect. This will be fixed in the next release (1.0alpha).
See my response to this (should clarify things):
SignalR - how to detect client connect/reconnect failure (e.g. timeout)
Upvotes: 1