From 76d1f34ed9cfe6f3a82117034b6bf9b7c79bf6de Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Fri, 19 May 2023 14:10:17 +0000 Subject: [PATCH] Fixes assert due to Flush in WritableStreamInternalController. --- src/workerd/api/streams/internal.c++ | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workerd/api/streams/internal.c++ b/src/workerd/api/streams/internal.c++ index 1c3bb2e02de..ee0d8e385c9 100644 --- a/src/workerd/api/streams/internal.c++ +++ b/src/workerd/api/streams/internal.c++ @@ -1237,8 +1237,8 @@ jsg::Promise WritableStreamInternalController::writeLoopAfterFrontOutputLo using Request = kj::Decay; return [this, &request]() -> decltype(auto) { - if constexpr (kj::isSameType()) { - // Write requests can have any number of requests backed up after them. + if constexpr (kj::isSameType() || kj::isSameType()) { + // Write and flush requests can have any number of requests backed up after them. KJ_ASSERT(!queue.empty()); } else { // Pipe and Close requests are always the last one in the queue.