mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
Fix dhcp delaying shutdown (#112670)
This commit is contained in:
@@ -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."""
|
||||||
|
Reference in New Issue
Block a user