Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
HubCallerContext is already disposed, its getter throws an error instead of doing anything useful (like returning a context where someone could check if it's disposed before trying to use it). When users attach OnHeartbeat handlers, I think it's fair to expect that the framework will stop calling them once the session is disposed. However, it seems like sometimes the heartbeats continue after this point, and this generates runtime errors because who wraps their property access attempts in a try/catch.
Expected Behavior
Heartbeat handlers are no longer called after session dispose, or accessor does not throw an error and Context has a property that devs can check themselves.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response