Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Python] Fix subscription error handling and re-subscription (#34372)
* [Python] Fix error callback in AsyncReadTransaction Currently the error callback is only called when the future is not done yet and the subscription handler exists. However, the subscription handler only gets initialized on successful subscription, which is also where the future gets set to done. So there is no situation where the error callback is being called, currently. Fix this by calling the error callback straight from the Matter SDK Thread when the subscription handler exists. This makes it independent of the future. * [Python] Update subscription id on re-subscribe Make sure we update the subscription ID in the subscription established callback when the subscription handler already exists. This makes sure that we have the correct subscription ID stored in the `SubscriptionTransaction` object after successfully re-subscribe too.
- Loading branch information