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:
Pascal Vizeli 2018-07-20 22:28:56 +02:00 committed by GitHub
parent 4df42e054d
commit cc3e6ec6fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,14 +79,10 @@ class APIProxy(CoreSysAttributes):
while True:
data = await client.content.read(10)
if not data:
await response.write_eof()
break
await response.write(data)
except aiohttp.ClientError:
await response.write_eof()
except asyncio.CancelledError:
pass
finally: