8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c430376 commit 7ab3149Copy full SHA for 7ab3149
Lib/asyncio/selector_events.py
@@ -180,9 +180,13 @@ def _accept_connection(
180
logger.debug("%r got a new connection from %r: %r",
181
server, addr, conn)
182
conn.setblocking(False)
183
- except (BlockingIOError, InterruptedError, ConnectionAbortedError):
184
- # Early exit because the socket accept buffer is empty.
185
- return None
+ except ConnectionAbortedError:
+ # Discard connections that were aborted before accept().
+ continue
186
+ except (BlockingIOError, InterruptedError):
187
+ # Early exit because of a signal or
188
+ # the socket accept buffer is empty.
189
+ return
190
except OSError as exc:
191
# There's nowhere to send the error, so just log it.
192
if exc.errno in (errno.EMFILE, errno.ENFILE,
0 commit comments