bug: fix anyio stream error on some linux distros when getting miner.
This commit is contained in:
@@ -22,6 +22,7 @@ import json
|
|||||||
import re
|
import re
|
||||||
from typing import AsyncGenerator, Callable, List, Optional, Tuple, Union
|
from typing import AsyncGenerator, Callable, List, Optional, Tuple, Union
|
||||||
|
|
||||||
|
import anyio
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from pyasic.logger import logger
|
from pyasic.logger import logger
|
||||||
@@ -475,7 +476,7 @@ class MinerFactory:
|
|||||||
try:
|
try:
|
||||||
resp = await session.get(url, follow_redirects=False)
|
resp = await session.get(url, follow_redirects=False)
|
||||||
return resp.text, resp
|
return resp.text, resp
|
||||||
except (httpx.HTTPError, asyncio.TimeoutError):
|
except (httpx.HTTPError, asyncio.TimeoutError, anyio.EndOfStream):
|
||||||
pass
|
pass
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user