fix(client): ensure data is yielded from buffer after stream ends (#126)
This commit is contained in:
parent
41679e2bd4
commit
f76d430567
@ -319,7 +319,7 @@ export class FalStream<Input, Output> {
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user