Skip to content
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

Session close refactoring #467

Merged
merged 24 commits into from
Oct 31, 2023
Merged

Session close refactoring #467

merged 24 commits into from
Oct 31, 2023

Conversation

Apollon77
Copy link
Collaborator

This PR is refactoring session handling especially in the area of "closing sessions" to assure that:

  • Sessions send close messsages when they should and not when not
  • Sessions are closed direvctly or delayed
  • When closing a session delayed then it is closed after the exchange really ended (and not after the pure interaction till now - because exchanges might have a close timer to make sure all retries happened)
  • Adding Session closiure handling also for Controller 8that one was ignoring that till now)
  • Adjust chip-testing to execute log tests correctly and allow to trigger log tests by commit message

To make the code flow easier it makes sense to store in the session instance if a session should be closed delayed or if a session close message should be sent out
Session closes can be triggered "synchronously" or "delayed when current running intercations were finished". The latter was not be correct because it is not the interaction that matters but the exchange that gets finished after the interaction is finished. Additionally the logic only implemented for MatterDevice nd not for Controller. So we move closing session logic to exchangemanager.
The session used to remove the fabric is closed delayed, all others immediately.
Needed that the Controller receives StatusReports for Session closures from devices
@Apollon77 Apollon77 requested a review from lauckhart October 31, 2023 15:26
packages/matter.js/src/protocol/ExchangeManager.ts Outdated Show resolved Hide resolved
packages/matter.js/src/session/SecureSession.ts Outdated Show resolved Hide resolved
@Apollon77 Apollon77 merged commit 4ef32c9 into project-chip:main Oct 31, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants