File tree 3 files changed +5
-20
lines changed
src/darwin/Framework/CHIP
3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,6 @@ NS_ASSUME_NONNULL_BEGIN
178
178
*/
179
179
- (void )invalidateCASESessionForNode : (NSNumber *)nodeID ;
180
180
181
- /* *
182
- * Invalidate the CASE session establishment for the specified node ID.
183
- * Must not be called on the Matter event queue.
184
- */
185
- - (void )invalidateCASESessionEstablishmentForNode : (NSNumber *)nodeID ;
186
-
187
181
/* *
188
182
* Download log of the desired type from the device.
189
183
*/
Original file line number Diff line number Diff line change @@ -1619,17 +1619,6 @@ - (void)invalidateCASESessionForNode:(NSNumber *)nodeID;
1619
1619
[self syncRunOnWorkQueue: block error: nil ];
1620
1620
}
1621
1621
1622
- - (void )invalidateCASESessionEstablishmentForNode : (NSNumber *)nodeID ;
1623
- {
1624
- auto block = ^{
1625
- auto caseSessionMgr = self->_cppCommissioner ->CASESessionMgr ();
1626
- VerifyOrDie (caseSessionMgr != nullptr );
1627
- caseSessionMgr->ReleaseSession (self->_cppCommissioner ->GetPeerScopedId (nodeID.unsignedLongLongValue ));
1628
- };
1629
-
1630
- [self syncRunOnWorkQueue: block error: nil ];
1631
- }
1632
-
1633
1622
- (void )operationalInstanceAdded : (NSNumber *)nodeID
1634
1623
{
1635
1624
// Don't use deviceForNodeID here, because we don't want to create the
Original file line number Diff line number Diff line change @@ -901,9 +901,11 @@ - (void)_triggerResubscribeWithReason:(NSString *)reason nodeLikelyReachable:(BO
901
901
} else if (_internalDeviceState == MTRInternalDeviceStateSubscribing && nodeLikelyReachable) {
902
902
// If we have reason to suspect that the node is now reachable and we haven’t established a
903
903
// CASE session yet, let’s consider it to be stalled and invalidate the pairing session.
904
- dispatch_async(self.queue, ^{
905
- [[self _concreteController] invalidateCASESessionEstablishmentForNode:self->_nodeID];
906
- });
904
+ [[self _concreteController] asyncGetCommissionerOnMatterQueue:^(Controller::DeviceCommissioner * commissioner) {
905
+ auto caseSessionMgr = commissioner->CASESessionMgr();
906
+ VerifyOrDie(caseSessionMgr != nullptr);
907
+ caseSessionMgr->ReleaseSession(commissioner->GetPeerScopedId(self->_nodeID.unsignedLongLongValue));
908
+ } errorHandler:nil /* not much we can do */];
907
909
}
908
910
}
909
911
You can’t perform that action at this time.
0 commit comments