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:
1 parent
10e3c00f07
commit
8a89643338
1 file changed
+9
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user