Skip to content

Commit

Permalink
Merge pull request #3153 from cloudflare/jsnell/no-need-to-error-on-a…
Browse files Browse the repository at this point in the history
…lready-closing-writable
  • Loading branch information
jasnell authored Nov 22, 2024
2 parents 0aa984a + 64478a0 commit c4f6890
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/workerd/api/streams/internal.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,7 @@ void WritableStreamInternalController::setHighWaterMark(uint64_t highWaterMark)

jsg::Promise<void> WritableStreamInternalController::closeImpl(jsg::Lock& js, bool markAsHandled) {
if (isClosedOrClosing()) {
auto reason = js.v8TypeError("This WritableStream has been closed."_kj);
return rejectedMaybeHandledPromise<void>(js, reason, markAsHandled);
return js.resolvedPromise();
}
if (isPiping()) {
auto reason = js.v8TypeError("This WritableStream is currently being piped to."_kj);
Expand Down

0 comments on commit c4f6890

Please sign in to comment.