Skip to content

Conversation

@vxgmichel
Copy link
Contributor

@vxgmichel vxgmichel commented Oct 29, 2018

The call to _untrack_reader is performed too soon, causing the protocol to forget about the reader before connection_lost can run and feed the EOF to the reader.

This PR currently fixes the issue by removing the _untrack_reader call and definition altogether.

https://bugs.python.org/issue35065

The call to `_untrack_reader` is performed too soon, causing the protocol
to forget about the reader before `connection_lost` can run and feed the
EOF to the reader. See bpo-35065.
@asvetlov
Copy link
Contributor

asvetlov commented Nov 8, 2018

Thank you for the fix, it looks correct.
Initially _on_reader_gc() callback had more complex logic, it was not safe to call it with closed transport.
The current code processes the case correctly, removing _untrack_reader is safe.

@asvetlov asvetlov merged commit fd512d7 into python:master Nov 8, 2018
@bedevere-bot
Copy link

@asvetlov: Please replace # with GH- in the commit message next time. Thanks!

@vxgmichel vxgmichel deleted the bpo-35065 branch November 8, 2018 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants