mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
asyncio: Don't log ConnectionAbortedError
Issue #26509: In fatal error handlers, don't log ConnectionAbortedError which occur on Windows.
This commit is contained in:
parent
2ba8ece5be
commit
c94a93aecb
5 changed files with 10 additions and 5 deletions
|
@ -54,6 +54,12 @@ _MIN_SCHEDULED_TIMER_HANDLES = 100
|
|||
# before cleanup of cancelled handles is performed.
|
||||
_MIN_CANCELLED_TIMER_HANDLES_FRACTION = 0.5
|
||||
|
||||
# Exceptions which must not call the exception handler in fatal error
|
||||
# methods (_fatal_error())
|
||||
_FATAL_ERROR_IGNORE = (BrokenPipeError,
|
||||
ConnectionResetError, ConnectionAbortedError)
|
||||
|
||||
|
||||
def _format_handle(handle):
|
||||
cb = handle._callback
|
||||
if inspect.ismethod(cb) and isinstance(cb.__self__, tasks.Task):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue