mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 22:56:31 +00:00
Ingress: Stop streaming response if stream is EOF
An empty data chunk signifies EOF. Stop streaming the response in that case. See https://github.com/aio-libs/aiohttp/blob/v3.12.13/aiohttp/streams.py#L471-L474.
This commit is contained in:
parent
38750d74a8
commit
f67f67ce91
@ -280,6 +280,8 @@ class APIIngress(CoreSysAttributes):
|
||||
response.headers["X-Accel-Buffering"] = "no"
|
||||
await response.prepare(request)
|
||||
async for data, _ in result.content.iter_chunks():
|
||||
if not data:
|
||||
break
|
||||
await response.write(data)
|
||||
|
||||
except (
|
||||
|
Loading…
x
Reference in New Issue
Block a user