Skip to content

Commit

Permalink
Fix up comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Aug 30, 2024
1 parent 58a8da6 commit 7f865fc
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ CHIP_ERROR DeviceSubscriptionManager::RemoveSubscription(chip::NodeId nodeId)
assertChipStackLockedByCurrentThread();
auto it = mDeviceSubscriptionMap.find(nodeId);
VerifyOrReturnError((it != mDeviceSubscriptionMap.end()), CHIP_ERROR_NOT_FOUND);
// We cannot safely erase the DeviceSubscription from mDeviceSubscriptionMap,
// after calling StopSubscription we expect DeviceSubscription to eventually
// We cannot safely erase the DeviceSubscription from mDeviceSubscriptionMap.
// After calling StopSubscription we expect DeviceSubscription to eventually
// call the OnDoneCallback we provided in StartSubscription which will call
// DeviceSubscriptionTerminated and have itself removed from the map.
// DeviceSubscriptionTerminated where it will be erased from the
// mDeviceSubscriptionMap.
it->second->StopSubscription();
return CHIP_NO_ERROR;
}
Expand Down

0 comments on commit 7f865fc

Please sign in to comment.