diff --git a/libs/client/src/streaming.ts b/libs/client/src/streaming.ts index c618ccf..0303f97 100644 --- a/libs/client/src/streaming.ts +++ b/libs/client/src/streaming.ts @@ -319,7 +319,7 @@ export class FalStream { const stopAsyncIterator = () => (running = false); this.on("error", stopAsyncIterator); this.on("done", stopAsyncIterator); - while (running) { + while (running || this.buffer.length > 0) { const data = this.buffer.shift(); if (data) { yield data;