-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug #564
Comments
This is a bug in httpcore where it tries to acquire a lock while in a cancelled scope. This should be refactored so no awaits happen inside the lock and so the lock can be removed. |
@graingert - Can you be more specific? |
This line raises a CancelledError when a request is cancelled, so the lock cannot be acquired and the connection cannot be released |
@tomchristie this is a design flaw in httpcore and needs to be re-done with an assumption of level cancellation |
Reopened by #627. |
Looking into this, the problem is that httpcore/httpcore/_async/connection_pool.py Lines 228 to 234 in d3ca620
Since we presumably don't want to hang forever if we can't get the lock (?), I'd wrap this in This is tricky enough to get right consistently at scale that |
Okay, so my assessment of this has changed... Actually the simplest way to fix this error is simply to not raise a We only get an error if we later attempt to read from a connection which has been closed. |
The text was updated successfully, but these errors were encountered: