From 4d09b73785c123532b73b25aa4650e99b8802a3c Mon Sep 17 00:00:00 2001 From: Ajinkya Indulkar <26824103+ajndkr@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:40:27 +0530 Subject: [PATCH] :bug: fix streaming_response bug --- lanarky/responses/streaming.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lanarky/responses/streaming.py b/lanarky/responses/streaming.py index eb8cb34..73c82d6 100644 --- a/lanarky/responses/streaming.py +++ b/lanarky/responses/streaming.py @@ -70,13 +70,11 @@ async def stream_response(self, send: Send) -> None: { "type": "http.response.body", "body": ensure_bytes(chunk, None), - "more_body": False, + "more_body": True, } ) - async with self._send_lock: - self.active = False - await send({"type": "http.response.body", "body": b"", "more_body": False}) + await send({"type": "http.response.body", "body": b"", "more_body": False}) @staticmethod def _create_chain_executor(