Use aiohttp.ClientTimeout for timeout (#122458)
This commit is contained in:
parent
545514c5cd
commit
156a2427ff
8 changed files with 18 additions and 8 deletions
|
@ -94,7 +94,7 @@ async def fetch_redirect_uris(hass: HomeAssistant, url: str) -> list[str]:
|
|||
try:
|
||||
async with (
|
||||
aiohttp.ClientSession() as session,
|
||||
session.get(url, timeout=5) as resp,
|
||||
session.get(url, timeout=aiohttp.ClientTimeout(total=5)) as resp,
|
||||
):
|
||||
async for data in resp.content.iter_chunked(1024):
|
||||
parser.feed(data.decode())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue