Prevent integrations from retrying setup once shutdown has started (#88818)
* Prevent integrations from retrying setup once shutdown has started * coverage
This commit is contained in:
parent
4898d22960
commit
f8934175cb
2 changed files with 26 additions and 0 deletions
|
@ -445,6 +445,10 @@ class ConfigEntry:
|
|||
|
||||
async def setup_again(*_: Any) -> None:
|
||||
"""Run setup again."""
|
||||
# Check again when we fire in case shutdown
|
||||
# has started so we do not block shutdown
|
||||
if hass.is_stopping:
|
||||
return
|
||||
self._async_cancel_retry_setup = None
|
||||
await self.async_setup(hass, integration=integration, tries=tries)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue