-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multiple subscriptions to the same attribute in chip-tool. (#18758)
Because the command object is the same for subscriptions to the same attribute, we were reusing the same mSubscribeClient unique_ptr for the new subscription, which killed off the old one. The changes here are as follows: 1) Keep track of a list of subscribe clients in InteractionModelReports. 2) To fix a (pre-existing) issue where we would crash on exit from interactive mode if we had alive subscription, introduce a Cleanup function on CHIPCommand which is called either immediately after Shutdown or when we exit interactive mode, depending on what the command wants. 3) Rearrange the attribute/event read/report commands to make sure we handle cleanup correctly and don't leak ReadClients (even temporarily, in the error cases). Fixes #18245
- Loading branch information
1 parent
d5d30e8
commit 1ecd9bd
Showing
6 changed files
with
153 additions
and
94 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
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
Oops, something went wrong.