8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 455077e commit 6393a0aCopy full SHA for 6393a0a
localstack/http/asgi.py
@@ -296,6 +296,8 @@ async def write(self, data: bytes) -> None:
296
if not self.started:
297
raise ValueError("not started the response yet")
298
if getattr(self.send.__self__, "closed", None):
299
+ # the connection has been closed from the client side, set finalized=True to avoid sending more responses
300
+ self.finalized = True
301
raise BrokenPipeError("Connection closed")
302
await self.send({"type": "http.response.body", "body": data, "more_body": True})
303
self.sent += len(data)
0 commit comments