mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Avoid many hass.is_stopping calls in the discovery helper (#99929)
async_has_matching_flow is more likely to be True than hass.is_stopping This does not make much difference but it was adding noise to a profile that I am digging into to look for another issue
This commit is contained in:
parent
9a45e2cf91
commit
bd1d8675a9
@ -44,8 +44,9 @@ def _async_init_flow(
|
|||||||
# as ones in progress as it may cause additional device probing
|
# as ones in progress as it may cause additional device probing
|
||||||
# which can overload devices since zeroconf/ssdp updates can happen
|
# which can overload devices since zeroconf/ssdp updates can happen
|
||||||
# multiple times in the same minute
|
# multiple times in the same minute
|
||||||
if hass.is_stopping or hass.config_entries.flow.async_has_matching_flow(
|
if (
|
||||||
domain, context, data
|
hass.config_entries.flow.async_has_matching_flow(domain, context, data)
|
||||||
|
or hass.is_stopping
|
||||||
):
|
):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user