Fix download error capture

This commit is contained in:
2022-08-15 16:39:06 +03:00
parent 6ea549eda2
commit 64f38f07d5

View File

@@ -75,7 +75,7 @@ class FLDownloader(BaseDownloader):
) )
try: try:
response = await client.send(request, stream=True) response = await client.send(request, stream=True)
except (asyncio.CancelledError, httpx.ReadError, httpx.ConnectError) as e: except (asyncio.CancelledError, httpx.HTTPError) as e:
await client.aclose() await client.aclose()
raise NotSuccess(str(e)) raise NotSuccess(str(e))