Skip to content

Commit

Permalink
Fix unhandled rejection in differential updater
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Feb 13, 2023
1 parent f9aaf30 commit 949efca
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions ts/updater/differential.ts
Expand Up @@ -368,15 +368,19 @@ export async function downloadRanges(

// Each `part` is a separate readable stream for one of the ranges
const onPart = async (part: Dicer.PartStream): Promise<void> => {
const diff = await takeDiffFromPart(part, diffByRange);

await saveDiffStream({
diff,
stream: part,
abortSignal,
output,
chunkStatusCallback,
});
try {
const diff = await takeDiffFromPart(part, diffByRange);

await saveDiffStream({
diff,
stream: part,
abortSignal,
output,
chunkStatusCallback,
});
} catch (error) {
dicer.destroy(error);
}
};

let boundary: string;
Expand Down

0 comments on commit 949efca

Please sign in to comment.