forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid double-delete when a Darwin subscribeAttribute subscription err…
…ors out. (project-chip#23557) * Avoid double-delete when a Darwin subscribeAttribute subscription errors out. Right now Darwin subscribeAttribute subscriptions do not support turning off auto-resubscribe, so never error out. But if we were to add that, we would end up with double delete: once when the error happens, and once from OnDone. This fix: 1) Ensures that we don't flag callback bridges as mKeepAlive until we have successfully sent a subscribe request. 2) Stops deleting on error if mKeepAlive is true. 3) Ensures the delete of the bridge from OnDone does not happen until after we have finished using the bridge object (e.g. to handle already-queued data or error notifications). We do this by queueing the delete to the same dispatch queue as the data/error notifications. * Address review comment.
- Loading branch information
1 parent
bd48b77
commit 2d34dcd
Showing
6 changed files
with
14,415 additions
and
7,701 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
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.