From 92798254173f9c34a7cdc7817a06a99d0394af2a Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Sat, 20 Jul 2024 09:59:22 +0200 Subject: [PATCH] `ClientDisconnect` inherits from `OSError` instead of `IOError` (#2393) --- uvicorn/protocols/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uvicorn/protocols/utils.py b/uvicorn/protocols/utils.py index 4845e1f7b..e1d6f01d5 100644 --- a/uvicorn/protocols/utils.py +++ b/uvicorn/protocols/utils.py @@ -6,7 +6,7 @@ from uvicorn._types import WWWScope -class ClientDisconnected(IOError): ... +class ClientDisconnected(OSError): ... def get_remote_addr(transport: asyncio.Transport) -> tuple[str, int] | None: