-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
When cancelling websocket, exception thrown: aiohttp._websocket.reader_c.WebSocketDataQueue' object has no attribute 'is_eof' #9880
Comments
Oh one important note: this was definitely not happening on 3.10.10 |
Looks like we don’t have a test for this case. Should be an easy fix |
Thanks for including the full trace in the initial report |
Happy to help! Thanks for the quick ACK |
I'm assuming you don't notice any production impact other than the trace in the log? |
I believe that is the case, yes |
Not having any luck replicating this or writing a test for it. It seems there has to be a payload present as well |
It looks like this can only happen if the |
Its likely something isn't closing the WebSocket connections and they are only getting cleaned up in garbage collection. Likely after cancellation in your case from the opening text. If |
It took me a while to figure out what why I couldn't replicate it in the tests. Our test harness was being a bit too helpful and cleaning up the unclosed WebSocket connections so we would never hit this path. |
3.11.2 published to PyPI with the fix in #9883 |
Describe the bug
When closing a websocket connection (in response to task.cancel() I think), I am seeing errors of this form:
A cursory reading of _websocket/reader.py seems to suggest that indeed there is no
is_eof
function.To Reproduce
Start a websocket and call .cancel() on the task or stop the event loop
Expected behavior
No error
Logs/tracebacks
aiohttp Version
multidict Version
propcache Version
yarl Version
OS
Debian
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: