Fix task cancelation

This commit is contained in:
2022-06-27 19:02:12 +03:00
parent 95792fa67e
commit 8fa759bd74

View File

@@ -101,7 +101,7 @@ class FLDownloader(BaseDownloader):
):
for task in done_tasks:
try:
data = task.result()
data = await task
await data[0].aclose()
await data[1].aclose()
@@ -129,9 +129,6 @@ class FLDownloader(BaseDownloader):
data = task.result()
for t_task in pending:
if not t_task.done() or t_task.cancelled():
continue
t_task.cancel()
await self._close_other_done(pending)