Close stream request once we end up with proxy (#9110)
* Close stream request once we end up with proxy * Update aiohttp_client.py * Update aiohttp_client.py * Removed trailing whitespace
This commit is contained in:
parent
493353e4de
commit
c537770786
1 changed files with 9 additions and 2 deletions
|
@ -90,8 +90,15 @@ def async_aiohttp_proxy_web(hass, request, web_coro, buffer_size=102400,
|
|||
# Something went wrong with the connection
|
||||
raise HTTPBadGateway() from err
|
||||
|
||||
yield from async_aiohttp_proxy_stream(hass, request, req.content,
|
||||
req.headers.get(CONTENT_TYPE))
|
||||
try:
|
||||
yield from async_aiohttp_proxy_stream(
|
||||
hass,
|
||||
request,
|
||||
req.content,
|
||||
req.headers.get(CONTENT_TYPE)
|
||||
)
|
||||
finally:
|
||||
req.close()
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue