fix: Long startup time when OnEvent
'start' times out (repeatedly)
#25693
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@Koenkk I don't believe there is a scenario where
onEvent
should take precedence over the startup of the rest of Z2M? So this should be fine. Should actually help with spammy networks.Fix #25681
This particular issue (probably more with the same cause though) was tracked down to this change:
Koenkk/zigbee-herdsman-converters#8479
These devices are apparently rather picky, and can be offline for a while after the coordinator comes back online, which means, if you have a lot of these, and they all time out, you end up with (10s timeout * number of devices) right in the middle of startup.
Same applies for other devices with similar scenario (hence the change at the top logic instead of in every converter).
@antst thanks for the very detailed testing for this, and the (long) time taken! 😉