Run websocket shutdown listener with run_immediately (#113727)

pull/87821/head^2
J. Nick Koston 2024-03-18 11:59:44 -10:00 committed by GitHub
parent 167e66d45c
commit 9be5f3531f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class WebSocketHandler:
self._handle_task = asyncio.current_task()
unsub_stop = hass.bus.async_listen(
EVENT_HOMEASSISTANT_STOP, self._async_handle_hass_stop
EVENT_HOMEASSISTANT_STOP, self._async_handle_hass_stop, run_immediately=True
)
writer = wsock._writer # pylint: disable=protected-access