Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng-yang committed Oct 9, 2024
1 parent e10817e commit d5f2d56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controller/python/chip/clusters/attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,12 @@ PyChipError pychip_WriteClient_WriteGroupAttributes(size_t groupIdSizeT, chip::C

void pychip_ReadClient_ShutdownSubscription(ReadClient * apReadClient)
{
// If an error occurs, the life cycle of apReadClient has ended.
// If apReadClient is nullptr, it means that its life cycle has ended (such as an error happend), and nothing needs to be done.
VerifyOrReturn(apReadClient != nullptr);
// If it is not SubscriptionType, this function should not be executed.
VerifyOrDie(apReadClient->IsSubscriptionType());

Optional<SubscriptionId> subscriptionId = apReadClient->GetSubscriptionId();
// If it is ReadType, this step will not be executed
VerifyOrDie(subscriptionId.HasValue());

FabricIndex fabricIndex = apReadClient->GetFabricIndex();
Expand Down

0 comments on commit d5f2d56

Please sign in to comment.