FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fixes leaking connections in _connect_addr by hexrain · Pull Request #468 · MagicStack/asyncpg · GitHub

fixes leaking connections in _connect_addr - #468

Merged
1st1 merged 2 commits into
MagicStack:masterfrom
hexrain:feature/fix-leaking-connections
Nov 19, 2019
Merged

fixes leaking connections in _connect_addr#468
1st1 merged 2 commits into
MagicStack:masterfrom
hexrain:feature/fix-leaking-connections

Conversation

hexrain commented Jul 23, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

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

1st1 merged commit 926f483 into MagicStack:master Nov 19, 2019

1st1 commented Nov 19, 2019

Copy link
Copy Markdown
Member

Thank you!

elprans added a commit that referenced this pull request Aug 16, 2020
`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
elprans added a commit that referenced this pull request Aug 16, 2020
`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
elprans added a commit that referenced this pull request Aug 16, 2020
`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
elprans added a commit that referenced this pull request Aug 27, 2020
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL