Skip to content

Commit 0dd5235

Browse files
Fix the lock to actually lock.
Co-authored-by: Jeff Tung <100387939+jtung-apple@users.noreply.github.com>
1 parent c19640a commit 0dd5235

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
@@ -1062,7 +1062,7 @@ - (void)_setupSubscription
10621062
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, static_cast<int64_t>(kSecondsToWaitBeforeMarkingUnreachableAfterSettingUpSubscription) * static_cast<int64_t>(NSEC_PER_SEC)), self.queue, ^{
10631063
MTRDevice * strongSelf = weakSelf.strongObject;
10641064
if (strongSelf != nil) {
1065-
std::lock_guard(strongSelf->_lock);
1065+
std::lock_guard lock(strongSelf->_lock);
10661066
[strongSelf _markDeviceAsUnreachableIfNeverSubscribed];
10671067
}
10681068
});

0 commit comments

Comments
 (0)