From a50fba4e0b6a7e084bc729b447452665decf3b6d Mon Sep 17 00:00:00 2001 From: jlvaillant Date: Sun, 17 Jan 2021 08:10:22 -0800 Subject: [PATCH] more graceful shutdown in the presence of a proxy_stream (#45246) --- homeassistant/helpers/aiohttp_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/helpers/aiohttp_client.py b/homeassistant/helpers/aiohttp_client.py index fe995222c67..3e1e45e5981 100644 --- a/homeassistant/helpers/aiohttp_client.py +++ b/homeassistant/helpers/aiohttp_client.py @@ -129,7 +129,7 @@ async def async_aiohttp_proxy_stream( await response.prepare(request) try: - while True: + while hass.is_running: with async_timeout.timeout(timeout): data = await stream.read(buffer_size)