From 2ef6fb330c7fb7f4b17c2cf89107d912e75f7133 Mon Sep 17 00:00:00 2001 From: Ahmed TAHRI Date: Sun, 13 Oct 2024 12:54:21 +0200 Subject: [PATCH] :wrench: also except ConnectionResetError for conn upgrade (especially on Windows) --- src/urllib3/backend/_async/hface.py | 1 + src/urllib3/backend/hface.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/urllib3/backend/_async/hface.py b/src/urllib3/backend/_async/hface.py index 6f5eb9cc77..0da85fa7af 100644 --- a/src/urllib3/backend/_async/hface.py +++ b/src/urllib3/backend/_async/hface.py @@ -547,6 +547,7 @@ async def _post_conn(self) -> None: # type: ignore[override] TimeoutError, SocketTimeout, ConnectionRefusedError, + ConnectionResetError, ) as e: if ( isinstance(self._protocol, HTTPOverQUICProtocol) diff --git a/src/urllib3/backend/hface.py b/src/urllib3/backend/hface.py index a6c1c5e96b..951f0cf290 100644 --- a/src/urllib3/backend/hface.py +++ b/src/urllib3/backend/hface.py @@ -600,6 +600,7 @@ def _post_conn(self) -> None: TimeoutError, SocketTimeout, ConnectionRefusedError, + ConnectionResetError, ) as e: if self.__alt_authority is not None: # we want to remove invalid quic cache capability