mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-27 02:56:31 +00:00
Fix stream error with aiohttp >= 3 (#579)
* Fix stream error with aiohttp >= 3 * Update proxy.py * Update proxy.py * Update proxy.py * Update proxy.py * Update proxy.py * Update proxy.py
This commit is contained in:
parent
4df42e054d
commit
cc3e6ec6fd
@ -79,14 +79,10 @@ class APIProxy(CoreSysAttributes):
|
|||||||
while True:
|
while True:
|
||||||
data = await client.content.read(10)
|
data = await client.content.read(10)
|
||||||
if not data:
|
if not data:
|
||||||
await response.write_eof()
|
|
||||||
break
|
break
|
||||||
await response.write(data)
|
await response.write(data)
|
||||||
|
|
||||||
except aiohttp.ClientError:
|
except aiohttp.ClientError:
|
||||||
await response.write_eof()
|
|
||||||
|
|
||||||
except asyncio.CancelledError:
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user