tweak, increase timeout for async
This commit is contained in:
parent
a9f45b43aa
commit
b073ce2fa5
1 changed files with 2 additions and 2 deletions
|
|
@ -55,8 +55,8 @@ async def attempt_request_async(url: str, port: Optional[int]) -> Optional[str]:
|
||||||
proxy = f"socks5h://127.0.0.1:{port}" if port else None
|
proxy = f"socks5h://127.0.0.1:{port}" if port else None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# timeout=3.0 strictly enforces the read/connect timeout for DNS as well with 5h
|
# timeout strictly enforces the read/connect timeout for DNS as well with 5h
|
||||||
async with httpx.AsyncClient(proxy=proxy, http2=False, timeout=3.0) as client:
|
async with httpx.AsyncClient(proxy=proxy, http2=False, timeout=5.0) as client:
|
||||||
raw_response = await client.get(url)
|
raw_response = await client.get(url)
|
||||||
|
|
||||||
filtered_response = classify_response(raw_response)
|
filtered_response = classify_response(raw_response)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue