Skip to content

Commit

Permalink
WIP fix flush issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner authored and cirospaciari committed Sep 17, 2024
1 parent 3d68a94 commit 95ec0d9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/js/builtins/ReadableStreamInternals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,15 +1101,8 @@ export function onFlushDirectStream() {
}

var _pendingRead = this._pendingRead;
this._pendingRead = undefined;
if (_pendingRead && $isPromise(_pendingRead)) {
var flushed = this.$sink.flush();
if (flushed?.byteLength) {
this._pendingRead = $getByIdDirectPrivate(stream, "readRequests")?.shift();
$fulfillPromise(_pendingRead, { value: flushed, done: false });
} else {
this._pendingRead = _pendingRead;
}
this.$sink.flush();
} else if ($getByIdDirectPrivate(stream, "readRequests")?.isNotEmpty()) {
var flushed = this.$sink.flush();
if (flushed?.byteLength) {
Expand Down

0 comments on commit 95ec0d9

Please sign in to comment.