Fix dhcp delaying shutdown (#112670)
This commit is contained in:
parent
c101eb5001
commit
d40bd0f6c8
1 changed files with 3 additions and 1 deletions
|
@ -316,7 +316,9 @@ class NetworkWatcher(WatcherBase):
|
|||
"""Start a new discovery task if one is not running."""
|
||||
if self._discover_task and not self._discover_task.done():
|
||||
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:
|
||||
"""Process discovery."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue