mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
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
@ -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…
x
Reference in New Issue
Block a user