mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Avoid creating logbook stream task if unsubscribed while waiting for executor (#86363)
This commit is contained in:
parent
8227c84e05
commit
c842666bea
@ -392,6 +392,10 @@ async def ws_event_stream(
|
|||||||
force_send=True,
|
force_send=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if msg_id not in connection.subscriptions:
|
||||||
|
# Unsubscribe happened while sending historical events
|
||||||
|
return
|
||||||
|
|
||||||
live_stream.task = asyncio.create_task(
|
live_stream.task = asyncio.create_task(
|
||||||
_async_events_consumer(
|
_async_events_consumer(
|
||||||
subscriptions_setup_complete_time,
|
subscriptions_setup_complete_time,
|
||||||
@ -402,10 +406,6 @@ async def ws_event_stream(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if msg_id not in connection.subscriptions:
|
|
||||||
# Unsubscribe happened while sending historical events
|
|
||||||
return
|
|
||||||
|
|
||||||
live_stream.wait_sync_task = asyncio.create_task(
|
live_stream.wait_sync_task = asyncio.create_task(
|
||||||
get_instance(hass).async_block_till_done()
|
get_instance(hass).async_block_till_done()
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user