Repository navigation
[Matter Direct] Recover CASE sessions after Thread Direct relink - #1282
Merged
Matthew Albert (malbert-silabs) merged 3 commits intoOct 20, 2026
Conversation
Matthew Albert (malbert-silabs)
requested a review
from a team
as a code owner
October 16, 2026 19:27
Junior Martinez (jmartinez-silabs)
approved these changes
Oct 20, 2026
Comment on lines
+800
to
+801
| auto optionalSession = peer_device->GetSecureSession(); | ||
| const SessionHandle & sessionHandle = optionalSession.Value(); |
Contributor
There was a problem hiding this comment.
What is the reasoning for this split? if it is a optionalSession should we check that it has a values?
optionalSession.HasValue()
Contributor
Author
There was a problem hiding this comment.
The split keeps the returned optional alive, avoiding a dangling reference after the semicolon. Both versions appeared to work in testing, but an LLM-assisted review flagged the lifetime issue.
I could add a HasValue() check, but I think it would be redundant as there is already a VerifyOrDie(HasValue()) inside Value(). If the intent is to handle a missing session gracefully, the earlier VerifyOrDie would also need to change.
Matthew Albert (malbert-silabs)
merged commit Oct 20, 2026
0855d37
into
feature/matter-direct
4 of 15 checks passed
Matthew Albert (malbert-silabs)
deleted the
feature/matter-direct-recover-case-td-link
branch
October 20, 2026 20:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After a peer reboot, the wake initiator can reuse a stale CASE session when the Thread Direct link reconnects, causing commands to fail.
Related issues
N/A
Testing
Switch/closure hardware retest passed.