Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lifetime of Darwin SubscriptionCallback to avoid shutdown crashes. #22324

Commits on Aug 31, 2022

  1. Fix lifetime of Darwin SubscriptionCallback to avoid shutdown crashes.

    The basic issue we could run into is that the Matter stack would shut down
    while our async block was still running on our client queue, and by the time
    the "delete this object" block was queued on the Matter queue that queue would
    be paused.  Then if the stack was restarted the queue would be unpaused, and
    the deletion of the ReadClient would happen early in stack startup, when things
    were not in a good state yet.
    
    The fix is to make sure we queue the async deletion without going through the
    client queue first, and avoid doing the async bits altogether when we can (when
    the subscription itself errors out).
    
    Fixes project-chip#22320
    bzbarsky-apple committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    e3bb221 View commit details
    Browse the repository at this point in the history