From 8ae10f2db634de5e862d6de31d8b592da6af847e Mon Sep 17 00:00:00 2001 From: Vlad Pronsky Date: Sun, 11 Feb 2024 01:08:20 +0200 Subject: [PATCH] do not lock accounts on ConnectTimeout #113 --- twscrape/queue_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twscrape/queue_client.py b/twscrape/queue_client.py index 7009052..f8386e2 100644 --- a/twscrape/queue_client.py +++ b/twscrape/queue_client.py @@ -221,7 +221,7 @@ async def req(self, method: str, url: str, params: ReqParams = None) -> Response except (httpx.ReadTimeout, httpx.ProxyError): # http transport failed, just retry with same account continue - except httpx.ConnectError as e: + except (httpx.ConnectError, httpx.ConnectTimeout) as e: # if proxy missconfigured or ??? connection_retry += 1 if connection_retry >= 3: