Fix unhandled rejection in differential updater
This commit is contained in:
parent
f9aaf30a32
commit
949efca190
1 changed files with 12 additions and 8 deletions
|
@ -368,15 +368,19 @@ export async function downloadRanges(
|
||||||
|
|
||||||
// Each `part` is a separate readable stream for one of the ranges
|
// Each `part` is a separate readable stream for one of the ranges
|
||||||
const onPart = async (part: Dicer.PartStream): Promise<void> => {
|
const onPart = async (part: Dicer.PartStream): Promise<void> => {
|
||||||
const diff = await takeDiffFromPart(part, diffByRange);
|
try {
|
||||||
|
const diff = await takeDiffFromPart(part, diffByRange);
|
||||||
|
|
||||||
await saveDiffStream({
|
await saveDiffStream({
|
||||||
diff,
|
diff,
|
||||||
stream: part,
|
stream: part,
|
||||||
abortSignal,
|
abortSignal,
|
||||||
output,
|
output,
|
||||||
chunkStatusCallback,
|
chunkStatusCallback,
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
dicer.destroy(error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let boundary: string;
|
let boundary: string;
|
||||||
|
|
Loading…
Add table
Reference in a new issue