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
I noticed the ConnectionState struct is being dropped before the request is finished when executing HTTP requests.
I have a custom middleware that uses the ConnectionGuard exposed via request extensions, and the number of active requests returned was 0 when it was supposed to be 1.
After some investigation, I found the conn instance is held active only for websocket requests, but for HTTP requests handled in the else branch, it is not used, causing the ConnectionState and the semaphore permit to be dropped before the request finished executing.
The text was updated successfully, but these errors were encountered:
I noticed the
ConnectionState
struct is being dropped before the request is finished when executing HTTP requests.I have a custom middleware that uses the
ConnectionGuard
exposed via request extensions, and the number of active requests returned was 0 when it was supposed to be 1.After some investigation, I found the
conn
instance is held active only for websocket requests, but for HTTP requests handled in theelse
branch, it is not used, causing theConnectionState
and the semaphore permit to be dropped before the request finished executing.The text was updated successfully, but these errors were encountered: