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
Merged PR 34318: Fix canceled requests in IIS (#52056)
Canceled requests can end up hanging a thread due to the `std::conditional_variable` never being triggered. This is because the previous assumption, that disconnect would be called once there was an http context set in the native layer, was wrong. Because `NotifyDisconnect` is called by IIS and `SetManagedHttpContext` is called by managed code, they can race and end up with `m_disconnectFired` as true, but `m_pManagedHttpContext` as false.
The fix is fairly simple, just don't gate unblocking the `std::conditional_variable` on whether the http context has been set.
Added comments as well to make it a little easier to understand some of the code, hopefully we'll slowly improve the maintainability by doing this with future changes as well.
Co-authored-by: Brennan Conroy <brecon@microsoft.com>
0 commit comments