From f7a760051f641effc4b0b3fcefe4e976fffdb239 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 21 Mar 2024 16:15:04 -0400 Subject: [PATCH] refactor: use our own abort controller --- app/data/file-provider.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/data/file-provider.ts b/app/data/file-provider.ts index 8719b6f..448f441 100644 --- a/app/data/file-provider.ts +++ b/app/data/file-provider.ts @@ -11,13 +11,17 @@ async function getIsManifest(s5: S5Client, hash: string): Promise { if (progressEvent.loaded >= 10) { - resp.cancel(); + abort.abort(); } }, - }) as CancelablePromise; + httpConfig: { + signal: abort.signal, + }, + }); const data = await resp; const unpacker = Unpacker.fromPacked(Buffer.from(data));