Skip to content
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

Fixing issue #7072 #7608

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/7072.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes the "Task was destroyed but it is pending" issue related to `TCPConnector._resolve_host` taking too long (probably because of a DNS lookup failure)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally to what Sam asked regarding adding a regression test, this change note must use RST syntax (hence double backticks, not single). And please, check out https://docs.aiohttp.org/en/stable/contributing.html#adding-change-notes-with-your-prs for the writing style to be used in the changelog. For example, in order for it to be coherent, the past tense should be used (or variants of the present tense referring to the changes as compared to the previous release).
You can also optionally add a byline. It's all described in that document.

1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Christopher Schmitt
Claudiu Popa
Colin Dunklau
Cong Xu
Cyril Nicodeme
Damien Nadé
Dan King
Dan Xu
Expand Down
1 change: 1 addition & 0 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@ def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
fut.result()

host_resolved.add_done_callback(drop_exception)
host_resolved.cancel()
raise
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
Expand Down