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 issuepull/99955/head
parent
9a45e2cf91
commit
bd1d8675a9
|
@ -44,8 +44,9 @@ def _async_init_flow(
|
|||
# as ones in progress as it may cause additional device probing
|
||||
# which can overload devices since zeroconf/ssdp updates can happen
|
||||
# multiple times in the same minute
|
||||
if hass.is_stopping or hass.config_entries.flow.async_has_matching_flow(
|
||||
domain, context, data
|
||||
if (
|
||||
hass.config_entries.flow.async_has_matching_flow(domain, context, data)
|
||||
or hass.is_stopping
|
||||
):
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue