Skip to content

Commit ef29dab

Browse files
Tobotimus1st1
authored andcommitted
Don't log OSError in transports
Resolves #257.
1 parent 72c8e2a commit ef29dab

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

uvloop/handles/basetransport.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cdef class UVBaseTransport(UVSocketHandle):
4040

4141
self._force_close(exc)
4242

43-
if not isinstance(exc, FATAL_SSL_ERROR_IGNORE):
43+
if not isinstance(exc, OSError):
4444

4545
if throw or self._loop is None:
4646
raise exc

uvloop/handles/streamserver.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ cdef class UVStreamServer(UVSocketHandle):
9292

9393
self._close()
9494

95-
if not isinstance(exc, FATAL_SSL_ERROR_IGNORE):
95+
if not isinstance(exc, OSError):
9696

9797
if throw or self._loop is None:
9898
raise exc

uvloop/includes/stdlib.pxi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,6 @@ cdef int ssl_SSL_ERROR_WANT_READ = ssl.SSL_ERROR_WANT_READ
133133
cdef int ssl_SSL_ERROR_WANT_WRITE = ssl.SSL_ERROR_WANT_WRITE
134134
cdef int ssl_SSL_ERROR_SYSCALL = ssl.SSL_ERROR_SYSCALL
135135

136-
cdef FATAL_SSL_ERROR_IGNORE = (
137-
BrokenPipeError,
138-
ConnectionResetError,
139-
ConnectionAbortedError,
140-
ssl.CertificateError,
141-
)
142-
143136
cdef uint64_t MAIN_THREAD_ID = <uint64_t><int64_t>threading.main_thread().ident
144137

145138
cdef int subprocess_PIPE = subprocess.PIPE

uvloop/sslproto.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ cdef class SSLProtocol:
839839
if self._transport:
840840
self._transport._force_close(exc)
841841

842-
if isinstance(exc, FATAL_SSL_ERROR_IGNORE):
842+
if isinstance(exc, OSError):
843843
if self._loop.get_debug():
844844
aio_logger.debug("%r: %s", self, message, exc_info=True)
845845
elif not isinstance(exc, aio_CancelledError):

0 commit comments

Comments
 (0)