Skip to content

Commit e8323ac

Browse files
authored
Merge 8305f8f into 8c25b44
2 parents 8c25b44 + 8305f8f commit e8323ac

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGES/5502.bugfix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Use variable ``client_error`` instead of a hard-coded ``ClientConnectorError`` exception
2+
in ``TCPConnector``.

aiohttp/connector.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
985985
except OSError as exc:
986986
# in case of proxy it is not ClientProxyConnectionError
987987
# it is problem of resolving proxy ip itself
988-
raise ClientConnectorError(req.connection_key, exc) from exc
988+
raise client_error(req.connection_key, exc) from exc
989989

990990
last_exc = None # type: Optional[Exception]
991991

@@ -1008,7 +1008,7 @@ def drop_exception(fut: "asyncio.Future[List[Dict[str, Any]]]") -> None:
10081008
req=req,
10091009
client_error=client_error,
10101010
)
1011-
except ClientConnectorError as exc:
1011+
except client_error as exc:
10121012
last_exc = exc
10131013
continue
10141014

0 commit comments

Comments
 (0)