mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 21:56:38 +08:00
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();
|
chunks.shift();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} 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");
|
console.warn("Failed to process chunk, attempting recovery");
|
||||||
// Attempt to recover by processing the next chunk
|
// Attempt to recover by processing the next chunk
|
||||||
if (chunks.length > 1) {
|
if (chunks.length > 1) {
|
||||||
@ -619,6 +622,7 @@ export function processChunks(
|
|||||||
throw new Error("Failed to process final chunk");
|
throw new Error("Failed to process final chunk");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
chunks,
|
chunks,
|
||||||
|
Loading…
Reference in New Issue
Block a user