From ce9de6e37a6323664eb7666b817932f371f1e099 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Fri, 7 Nov 2025 00:05:21 +0000 Subject: [PATCH] Ignore "muted" errors during request creation --- src/microdot/microdot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/microdot/microdot.py b/src/microdot/microdot.py index 5a4f8c2..615a47f 100644 --- a/src/microdot/microdot.py +++ b/src/microdot/microdot.py @@ -1371,6 +1371,11 @@ class Microdot: try: req = await Request.create(self, reader, writer, writer.get_extra_info('peername')) + except OSError as exc: # pragma: no cover + if exc.errno in MUTED_SOCKET_ERRORS: + pass + else: + raise except Exception as exc: # pragma: no cover print_exception(exc)