Add workround for deno can not handle error in streams

This commit is contained in:
2023-07-22 21:52:17 +08:00
parent 26a0d045e0
commit ea41cb0081
2 changed files with 23 additions and 11 deletions

View File

@@ -343,6 +343,9 @@ export async function download_task(
signal: force_abort,
preventClose: true,
});
if (pr.error) {
throw (pr.error);
}
} finally {
try {
f.close();