Skip to content

Commit 17649a0

Browse files
authored
Merge pull request #672 from cloudflare/dominik/sockets-fix-assert-in-streams
Fixes assert due to Flush in WritableStreamInternalController.
2 parents 270223d + 76d1f34 commit 17649a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/workerd/api/streams/internal.c++

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,8 +1237,8 @@ jsg::Promise<void> WritableStreamInternalController::writeLoopAfterFrontOutputLo
12371237
using Request = kj::Decay<decltype(request)>;
12381238

12391239
return [this, &request]() -> decltype(auto) {
1240-
if constexpr (kj::isSameType<Request, Write>()) {
1241-
// Write requests can have any number of requests backed up after them.
1240+
if constexpr (kj::isSameType<Request, Write>() || kj::isSameType<Request, Flush>()) {
1241+
// Write and flush requests can have any number of requests backed up after them.
12421242
KJ_ASSERT(!queue.empty());
12431243
} else {
12441244
// Pipe and Close requests are always the last one in the queue.

0 commit comments

Comments
 (0)