From b80b2068a2097c7ec44f33347cd08c4afb8d05e7 Mon Sep 17 00:00:00 2001 From: Fawad Shaikh Date: Fri, 13 Oct 2023 14:54:26 -0400 Subject: [PATCH] fix: ensure stream is done --- crates/wick/wick-trigger-http/src/http/component_utils.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/wick/wick-trigger-http/src/http/component_utils.rs b/crates/wick/wick-trigger-http/src/http/component_utils.rs index d9d8bcbb..4edea58d 100644 --- a/crates/wick/wick-trigger-http/src/http/component_utils.rs +++ b/crates/wick/wick-trigger-http/src/http/component_utils.rs @@ -183,6 +183,9 @@ pub(super) async fn respond( let (tx, rx) = unbounded_channel(); let _output_handle = tokio::spawn(async move { while let Some(p) = body_stream.recv().await { + if !p.has_data() { + continue; + } match codec { Codec::Json => { let chunk = p