Avoid useless done check in config entries async_create_task (#114695)
If the task is not started with eager_start it will never be done right awaypull/114741/head
parent
74d8c6cce4
commit
41a88c876d
|
@ -1072,7 +1072,7 @@ class ConfigEntry:
|
|||
task = hass.async_create_task(
|
||||
target, f"{name} {self.title} {self.domain} {self.entry_id}", eager_start
|
||||
)
|
||||
if task.done():
|
||||
if eager_start and task.done():
|
||||
return task
|
||||
self._tasks.add(task)
|
||||
task.add_done_callback(self._tasks.remove)
|
||||
|
|
Loading…
Reference in New Issue