diff --git a/homeassistant/components/hassio/ingress.py b/homeassistant/components/hassio/ingress.py index 499a83b0444..f9ff1dd7770 100644 --- a/homeassistant/components/hassio/ingress.py +++ b/homeassistant/components/hassio/ingress.py @@ -18,6 +18,7 @@ from homeassistant.components.http import HomeAssistantView from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.typing import UNDEFINED +from homeassistant.util.async_ import create_eager_task from .const import X_HASS_SOURCE, X_INGRESS_PATH from .http import should_compress @@ -143,8 +144,8 @@ class HassIOIngress(HomeAssistantView): # Proxy requests await asyncio.wait( [ - asyncio.create_task(_websocket_forward(ws_server, ws_client)), - asyncio.create_task(_websocket_forward(ws_client, ws_server)), + create_eager_task(_websocket_forward(ws_server, ws_client)), + create_eager_task(_websocket_forward(ws_client, ws_server)), ], return_when=asyncio.FIRST_COMPLETED, )