Skip to content

fix: MQTT status refresh loop blocks HA startup (#225)#244

Open
RikoDEV wants to merge 1 commit into
meshcore-dev:mainfrom
RikoDEV:fix/startup-hang
Open

fix: MQTT status refresh loop blocks HA startup (#225)#244
RikoDEV wants to merge 1 commit into
meshcore-dev:mainfrom
RikoDEV:fix/startup-hang

Conversation

@RikoDEV
Copy link
Copy Markdown

@RikoDEV RikoDEV commented May 19, 2026

In current implementation Home Assistant startup takes a lot of time to finalize.

_async_status_refresh_loop was started with hass.async_create_task(), which registers the task in HA's startup tracker. Since the loop never exits (300 s sleep, runs while clients are connected), HA startup hung waiting for it on every restart.

Changed to asyncio.create_task() so the task is not tracked by HA's startup phase. async_stop() already explicitly cancels and awaits _status_refresh_task on unload, so shutdown cleanup is unchanged.

@RikoDEV RikoDEV changed the title Fix startup wait for mqtt (meshcore-dev/meshcore-ha#225) fix: MQTT status refresh loop blocks HA startup (#225) May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant