diff -r 3f921c3b1e87 Lib/asyncio/base_events.py --- a/Lib/asyncio/base_events.py Fri Mar 11 22:53:15 2016 +0100 +++ b/Lib/asyncio/base_events.py Fri Mar 11 23:44:10 2016 +0100 @@ -54,6 +54,12 @@ from .log import logger # 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): diff -r 3f921c3b1e87 Lib/asyncio/proactor_events.py --- a/Lib/asyncio/proactor_events.py Fri Mar 11 22:53:15 2016 +0100 +++ b/Lib/asyncio/proactor_events.py Fri Mar 11 23:44:10 2016 +0100 @@ -90,7 +90,7 @@ class _ProactorBasePipeTransport(transpo self.close() def _fatal_error(self, exc, message='Fatal error on pipe transport'): - if isinstance(exc, (BrokenPipeError, ConnectionResetError)): + if isinstance(exc, base_events._FATAL_ERROR_IGNORE): if self._loop.get_debug(): logger.debug("%r: %s", self, message, exc_info=True) else: diff -r 3f921c3b1e87 Lib/asyncio/selector_events.py --- a/Lib/asyncio/selector_events.py Fri Mar 11 22:53:15 2016 +0100 +++ b/Lib/asyncio/selector_events.py Fri Mar 11 23:44:10 2016 +0100 @@ -578,8 +578,7 @@ class _SelectorTransport(transports._Flo def _fatal_error(self, exc, message='Fatal error on transport'): # Should be called from exception handler only. - if isinstance(exc, (BrokenPipeError, - ConnectionResetError, ConnectionAbortedError)): + if isinstance(exc, base_events._FATAL_ERROR_IGNORE): if self._loop.get_debug(): logger.debug("%r: %s", self, message, exc_info=True) else: diff -r 3f921c3b1e87 Lib/asyncio/sslproto.py --- a/Lib/asyncio/sslproto.py Fri Mar 11 22:53:15 2016 +0100 +++ b/Lib/asyncio/sslproto.py Fri Mar 11 23:44:10 2016 +0100 @@ -655,7 +655,7 @@ class SSLProtocol(protocols.Protocol): def _fatal_error(self, exc, message='Fatal error on transport'): # Should be called from exception handler only. - if isinstance(exc, (BrokenPipeError, ConnectionResetError)): + if isinstance(exc, base_events._FATAL_ERROR_IGNORE): if self._loop.get_debug(): logger.debug("%r: %s", self, message, exc_info=True) else: diff -r 3f921c3b1e87 Lib/asyncio/unix_events.py --- a/Lib/asyncio/unix_events.py Fri Mar 11 22:53:15 2016 +0100 +++ b/Lib/asyncio/unix_events.py Fri Mar 11 23:44:10 2016 +0100 @@ -575,7 +575,7 @@ class _UnixWritePipeTransport(transports def _fatal_error(self, exc, message='Fatal error on pipe transport'): # should be called by exception handler only - if isinstance(exc, (BrokenPipeError, ConnectionResetError)): + if isinstance(exc, base_events._FATAL_ERROR_IGNORE): if self._loop.get_debug(): logger.debug("%r: %s", self, message, exc_info=True) else: