c# - SignalR disconnect not being called on internet disconnection/re-connection -
c# - SignalR disconnect not being called on internet disconnection/re-connection -
i using signalr in app.i have app depends great grade on ondisconnected()
beingness called correctly. , called correctly under next circumstances:
public task ondisconnected() { seek { deleteuser(context.connectionid); homecoming null; } grab (exception ex) { homecoming null; } }
the user refreshes page the user navigates new page the user closes browser however, not called if network connection drops. instance, if unplug network cable on client machine, or disable client's wireless network, or unplug router, ondisconnected()
never called, after several min wait.
it raise disconnected not immediately. there's configurable threshold (30 seconds default) signalr wait (after underlying tcp connection has gone away , isn't immediate either) before considers client disconnected. if connection drops , reconnects before configured timeout won't raise ondisconnected.
if you're never seeing beingness raised in scenario after waiting while might bug. signalr 1.0 released today i'd encourage seek , see if still see problem.
c# asp.net signalr signalr-hub signalr.client
Comments
Post a Comment