forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-113538: Don't error in stream reader protocol callback when …
…task is cancelled (pythonGH-113690) (cherry picked from commit 4681a52) Co-authored-by: Guido van Rossum <guido@python.org>
- Loading branch information
1 parent
c828dbc
commit 6429b46
Showing
3 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Library/2024-01-03-14-19-26.gh-issue-113538.ahuBCo.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
In :meth:`asyncio.StreamReaderProtocol.connection_made`, there is callback | ||
that logs an error if the task wrapping the "connected callback" fails. This | ||
callback would itself fail if the task was cancelled. Prevent this by | ||
checking whether the task was cancelled first. If so, close the transport | ||
but don't log an error. |