You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HttpConnectionContext.TickHeartbeat() in SignalR ticks after the context is disposed, causing runtime errors when accessing context from heartbeat handlers #60631
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.