Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfixes leaking connections in _connect_addr #468
Conversation
Thank you! |
`asyncio.wait_for()` currently has a bug where it raises a `CancelledError` even when the wrapped awaitable has completed. The upstream fix is in python/cpython#37658. This adds a workaround until the aforementioned PR is merged, backported and released. Fixes: #467 Fixes: #547 Related: #468 Supersedes: #548
`asyncio.wait_for()` currently has a bug where it raises a `CancelledError` even when the wrapped awaitable has completed. The upstream fix is in python/cpython#21894. This adds a workaround until the aforementioned PR is merged, backported and released. Fixes: #467 Fixes: #547 Related: #468 Supersedes: #548
`asyncio.wait_for()` currently has a bug where it raises a `CancelledError` even when the wrapped awaitable has completed. The upstream fix is in python/cpython#21894. This adds a workaround until the aforementioned PR is merged, backported and released. Co-authored-by: Adam Liddell <git@aliddell.com> Fixes: #467 Fixes: #547 Related: #468 Supersedes: #548
`asyncio.wait_for()` currently has a bug where it raises a `CancelledError` even when the wrapped awaitable has completed. The upstream fix is in python/cpython#21894. This adds a workaround until the aforementioned PR is merged, backported and released. Co-authored-by: Adam Liddell <git@aliddell.com> Fixes: #467 Fixes: #547 Related: #468 Supersedes: #548
Short summary
I've discovered that inner coroutine passed to
asyncio.wait_for
function may not be canceled even though CancelledError is raised.Since there is no references to protocol or transport objects – that connection will leak forever.
I've found rather dirty way to deal with it. How can it be improved?
Detailed information can be found here:
https://bugs.python.org/issue37658
#467
https://stackoverflow.com/questions/57163025/socket-leak-with-wait-for-in-asyncio-with-python3-6-and-python3-7