-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use reference counted ExchangeHandle instead of raw ExchangeContext pointer in PairingSession #32498
Comments
pidarped
added a commit
to pidarped/connectedhomeip
that referenced
this issue
Mar 8, 2024
…airingSession. This ensures that the ExchangeContext for the session is automatically reference counted without explicit manual Retain() and Release() calls. As a result, the ExchangeContext is held until PairingSession::Clear() gets called that, in turn, calls ClearValue() on the Optional to internally call Release() on the underlying target. Fixes Issue project-chip#32498.
pidarped
added a commit
to pidarped/connectedhomeip
that referenced
this issue
Mar 8, 2024
…airingSession. This ensures that the ExchangeContext for the session is automatically reference counted without explicit manual Retain() and Release() calls. As a result, the ExchangeContext is held until PairingSession::Clear() gets called that, in turn, calls ClearValue() on the Optional to internally call Release() on the underlying target. Fixes Issue project-chip#32498.
pidarped
added a commit
to pidarped/connectedhomeip
that referenced
this issue
Mar 8, 2024
…airingSession. This ensures that the ExchangeContext for the session is automatically reference counted without explicit manual Retain() and Release() calls. As a result, the ExchangeContext is held until PairingSession::Clear() gets called that, in turn, calls ClearValue() on the Optional to internally call Release() on the underlying target. Fixes Issue project-chip#32498.
yufengwangca
pushed a commit
that referenced
this issue
Mar 11, 2024
…airingSession. (#32499) This ensures that the ExchangeContext for the session is automatically reference counted without explicit manual Retain() and Release() calls. As a result, the ExchangeContext is held until PairingSession::Clear() gets called that, in turn, calls ClearValue() on the Optional to internally call Release() on the underlying target. Fixes Issue #32498.
huangxuyong
pushed a commit
to huangxuyong/connectedhomeip
that referenced
this issue
Mar 19, 2024
…airingSession. (project-chip#32499) This ensures that the ExchangeContext for the session is automatically reference counted without explicit manual Retain() and Release() calls. As a result, the ExchangeContext is held until PairingSession::Clear() gets called that, in turn, calls ClearValue() on the Optional to internally call Release() on the underlying target. Fixes Issue project-chip#32498.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature description
The PairingSession class(from which CASESession and PASESession derive) keeps a pointer to the ExchangeContext object as a member. Since it is not automatically reference counted(without explicit Retain() and Release()), it can get release prematurely in certain flows(e.g., before PairingSession::Finish() if no Standalone Ack is expected from the last message sent).
Instead, if an ExchangeHandle is used, it is held until it is finally released in PairingSession::Clear(), when it is destroyed.
Platform
core
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: