summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/proactor_events.py3
-rw-r--r--Lib/asyncio/unix_events.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index 3b44f24..d2553eb 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -54,7 +54,8 @@ class _ProactorBasePipeTransport(transports.BaseTransport):
self._read_fut.cancel()
def _fatal_error(self, exc):
- logger.exception('Fatal error for %s', self)
+ if not isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ logger.exception('Fatal error for %s', self)
self._force_close(exc)
def _force_close(self, exc):
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 219c88a..a1aff3f 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -363,7 +363,8 @@ class _UnixWritePipeTransport(transports.WriteTransport):
def _fatal_error(self, exc):
# should be called by exception handler only
- logger.exception('Fatal error for %s', self)
+ if not isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ logger.exception('Fatal error for %s', self)
self._close(exc)
def _close(self, exc=None):