Repository navigation
[3.15] gh-109564: asyncio: drop connections accepted by a closed server (GH-160851) - #160878
Merged
Merged
Conversation
pythonGH-160851) If Server.close() ran after a connection was accepted but before its transport was created, Server._attach() hit an assertion, the error was reported to the exception handler, and the half-built transport later raised TypeError from __del__. Close such connections quietly instead, in both the selector and proactor accept paths. (cherry picked from commit 5364bdc) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
miss-islington
requested review from
1st1,
asvetlov and
kumaraditya303
as code owners
October 29, 2026 10:08
This was referenced Oct 29, 2026
asvetlov
enabled auto-merge (squash)
October 29, 2026 10:10
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If Server.close() ran after a connection was accepted but before its
transport was created, Server._attach() hit an assertion, the error was
reported to the exception handler, and the half-built transport later
raised TypeError from del. Close such connections quietly instead,
in both the selector and proactor accept paths.
(cherry picked from commit 5364bdc)
Co-authored-by: Andrew Svetlov andrew.svetlov@gmail.com
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com