Skip to content

Commit

Permalink
🐛 fix streaming_response bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ajndkr committed Nov 16, 2023
1 parent e8d786f commit 4d09b73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lanarky/responses/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4d09b73

Please sign in to comment.