mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Fix dhcp delaying shutdown (#112670)
This commit is contained in:
parent
c101eb5001
commit
d40bd0f6c8
@ -316,7 +316,9 @@ class NetworkWatcher(WatcherBase):
|
|||||||
"""Start a new discovery task if one is not running."""
|
"""Start a new discovery task if one is not running."""
|
||||||
if self._discover_task and not self._discover_task.done():
|
if self._discover_task and not self._discover_task.done():
|
||||||
return
|
return
|
||||||
self._discover_task = self.hass.async_create_task(self.async_discover())
|
self._discover_task = self.hass.async_create_background_task(
|
||||||
|
self.async_discover(), name="dhcp discovery", eager_start=True
|
||||||
|
)
|
||||||
|
|
||||||
async def async_discover(self) -> None:
|
async def async_discover(self) -> None:
|
||||||
"""Process discovery."""
|
"""Process discovery."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user