gh-90871: fix connection backlog offset in asyncio (gh-134392)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Christian Harries 2025-05-21 14:59:09 +01:00 committed by GitHub
parent 15a8b5b9bd
commit 109f7597d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View file

@ -173,7 +173,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
# listening socket has triggered an EVENT_READ. There may be multiple
# connections waiting for an .accept() so it is called in a loop.
# See https://bugs.python.org/issue27906 for more details.
for _ in range(backlog):
for _ in range(backlog + 1):
try:
conn, addr = sock.accept()
if self._debug: