-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Reading received data from a closed TCP stream using StreamReader.read
might hang forever
#79246
Comments
I'm not sure whether it is intended or not, but I noticed a change in the behavior of Basically, reading some received data from a closed TCP stream using I'm not sure what those conditions are but I managed to reproduce the issue consistently with the following workflow:
The test attached implements the behavior. It fails on 3.8 but passes on 3.7 |
Hi Vincent! No, the hang is not intended behavior. Thanks for the report. |
Hi Andrew! I reverted the commit associated with the following PR, and the hanging issue disappeared: I'll look into it. |
I found the culprit: cpython/Lib/asyncio/streams.py Line 350 in a05bef4
The call to The fix attached removes the With this fix, calling
But maybe I'm missing something about |
StreamReaderProtocol._untrack_reader
#10212Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: