Skip to content

[3.14] gh-109564: asyncio: drop connections accepted by a closed server (GH-160851) - #160879

Merged
asvetlov merged 1 commit into
python:3.14from
miss-islington:backport-5364bdc-3.14
Oct 29, 2026
Merged

asvetlov merged 1 commit into
python:3.14from
miss-islington:backport-5364bdc-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

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>
@asvetlov
asvetlov enabled auto-merge (squash) October 29, 2026 10:10
@asvetlov
asvetlov merged commit ed5531c into python:3.14 Oct 29, 2026
51 checks passed
@miss-islington
miss-islington deleted the backport-5364bdc-3.14 branch October 29, 2026 10:38
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