mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +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
|
# Something went wrong with the connection
|
||||||
raise HTTPBadGateway() from err
|
raise HTTPBadGateway() from err
|
||||||
|
|
||||||
yield from async_aiohttp_proxy_stream(hass, request, req.content,
|
try:
|
||||||
req.headers.get(CONTENT_TYPE))
|
yield from async_aiohttp_proxy_stream(
|
||||||
|
hass,
|
||||||
|
request,
|
||||||
|
req.content,
|
||||||
|
req.headers.get(CONTENT_TYPE)
|
||||||
|
)
|
||||||
|
finally:
|
||||||
|
req.close()
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user