mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix MQTT birth message deadlock (#43790)
This commit is contained in:
parent
a5c79a1f84
commit
d18a33020b
@ -944,7 +944,9 @@ class MQTT:
|
||||
)
|
||||
|
||||
birth_message = Message(**self.conf[CONF_BIRTH_MESSAGE])
|
||||
self.hass.add_job(publish_birth_message(birth_message))
|
||||
asyncio.run_coroutine_threadsafe(
|
||||
publish_birth_message(birth_message), self.hass.loop
|
||||
)
|
||||
|
||||
def _mqtt_on_message(self, _mqttc, _userdata, msg) -> None:
|
||||
"""Message received callback."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user