Enhance processChunks by attempting to recover by processing the next chunk.
This commit is contained in:
parent
e455840ab3
commit
cb0422b8f2
|
@ -609,6 +609,9 @@ export function processChunks(
|
|||
chunks.shift();
|
||||
}
|
||||
} catch (e) {
|
||||
// console.error("[Chunk Process Error]:", e);
|
||||
// chunks.shift(); // Remove error chunk
|
||||
// pendingChunk = null; // Reset pending chunk on error
|
||||
console.warn("Failed to process chunk, attempting recovery");
|
||||
// Attempt to recover by processing the next chunk
|
||||
if (chunks.length > 1) {
|
||||
|
@ -619,6 +622,7 @@ export function processChunks(
|
|||
throw new Error("Failed to process final chunk");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
chunks,
|
||||
|
|
Loading…
Reference in New Issue