Skip to content

Commit 7a09a12

Browse files
committed
Fix the check for the cluster paths
1 parent a78c3c3 commit 7a09a12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/darwin/Framework/CHIP/MTRDevice.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,7 @@ - (void)_pruneOrphanedEndpointsAndClusters:(MTRAttributePath *)attributePath
28442844
NSDictionary<MTRClusterPath *, MTRDeviceClusterData *> * dataStoreClusterData = [self.deviceController.controllerDataStore getStoredClusterDataForNodeID:self.nodeID];
28452845
NSMutableDictionary<MTRClusterPath *, MTRDeviceClusterData *> * dataStoreClusterDataCopy = [dataStoreClusterData mutableCopy];
28462846
for (MTRClusterPath * dataStorePath in dataStoreClusterData) {
2847-
if ([dataStorePath isEqualTo:path]) {
2847+
if ([dataStorePath.endpoint isEqualToNumber:path.endpoint] && [dataStorePath.cluster isEqualToNumber:path.cluster]) {
28482848
[dataStoreClusterDataCopy removeObjectForKey:path];
28492849
[dataStoreClusterDataCopy setObject:clusterData forKey:path];
28502850
[self.deviceController.controllerDataStore storeClusterData:dataStoreClusterDataCopy forNodeID:self.nodeID];

0 commit comments

Comments
 (0)