-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[Matter.framework] Invalidate the CASE session if something calls Tri… #36298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Matter.framework] Invalidate the CASE session if something calls Tri… #36298
Conversation
…ggerResubscriptionWithReason and it has not been established yet
|
PR #36298: Size comparison from 7df7676 to ec2ff36 Full report (68 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
| #endif // CHIP_DEVICE_CONFIG_ENABLE_AUTOMATIC_CASE_RETRIES | ||
| TransportPayloadCapability transportPayloadCapability = TransportPayloadCapability::kMRPPayload); | ||
|
|
||
| void ReleaseSession(const ScopedNodeId & peerId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document.
| caseSessionMgr->ReleaseSession(self->_cppCommissioner->GetPeerScopedId(nodeID.unsignedLongLongValue)); | ||
| }; | ||
|
|
||
| [self syncRunOnWorkQueue:block error:nil]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a sync dispatch here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // If we have reason to suspect that the node is now reachable and we haven’t established a | ||
| // CASE session yet, let’s consider it to be stalled and invalidate the pairing session. | ||
| dispatch_async(self.queue, ^{ | ||
| [[self _concreteController] invalidateCASESessionEstablishmentForNode:self->_nodeID]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't add new controller API here, I would think. Just asyncGetCommissionerOnMatterQueue and go from there.
That said, do we have any indication that we are not just going to get a slew of _triggerResubscribeWithReason from DNS-SD stuff while nothing has really changed? I'm really worried about us getting into a state where we just keep canceling things and never manage to subscribe. It does help that we only do this when we have no CASE session yet, at least....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ggerResubscriptionWithReason and it has not been established yet (project-chip#36298)
…ggerResubscriptionWithReason and it has not been established yet
Problem
When setting up the initial subscription and it appears to be stuck, let’s cancel the session establishment. This will cause the session to fail, and the error will be caught by the following GitHub repository:
connectedhomeip/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm
Line 2456 in 7df7676