-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop doing read-throughs on MTRDevice when subscription is being esta…
…blished. (#32990) * Stop doing read-throughs on MTRDevice when subscription is being established. The key goal is to stop doing read-throughs when we expect to start getting data soon: between sending the Sigma1 for our initial subscribe and getting the first priming read data packets. Any reads dispatched during that time "because we don't have a subscription yet" are just wasted network traffic, because chances are we're about to have a subscription and get that data as part of the priming read anyway. The main fix is just to stop doing read-throughs altogether for any attributes known to not be C and if we have a subscription delegate. In that state we should be subscribed and should be getting updates for attribute values, and there's no reason to read through. The rest of the changes are related to a side-effect of the stopping of read-throughs: if we had a subscription drop and have backed off quite a bit, a read-through that succeeded could prod us to retry subscribing. We don't want to do a read just to (maybe) trigger that behavior, though. Instead, treat a skipped read-through as a direct signal to retry our subscription attempt. But not too often. This "try to resubscribe" heuristic can probably use some tweaking. * Fix XPC test failure.
- Loading branch information
1 parent
0c17072
commit 4aadee7
Showing
1 changed file
with
120 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters