-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am trying to detect disconnected signalr clients. OnDisconnectAsync is never called. If the behavior to not fire OnDisconnectAsync when a debugger is attached (documented only in issues like #18879 but not in the docs?) was configurable it would probably be easier to debug. Who had the genius idea that an undocumented (and not configurable) change in behavior for debug builds makes debugging easier? Sadly it doesn't for me. But even twiddling with the timeout knobs and using release builds doesn't seem to ever trigger a OnDisconnectAsync when the browser window is simply closed.
The network tab reveals pings from the client to the server every few seconds - so the hub should definitely be able to recognize a client with cardiac arrest, i.e. no heartbeat.
Expected Behavior
OnDisconnectAsync is called at last.
.NET Version
9.0.302