Shift multi-callback management from OperationalDeviceProxy
to CASESessionManager
#18583
Labels
OperationalDeviceProxy
to CASESessionManager
#18583
Problem
Comments like this one reveal that clean-up of
OperationalDeviceProxy
instances on failure is just fraught with peril. Currently, callers ofFindOrEstablishSession
are responsible for releasingOperationalDeviceProxy
instances on error. This is really error-prone. The ability forOperationalDeviceProxy
to support multiple registered callbacks on the same instance complicates this story.Proposal
Extending the idea in that comment, up-level the multi-callback management scheme in
OperationalDeviceProxy
toCASESessionManager
. This simplifiesOperationalDeviceProxy
down to just managing a single callback, while permittingCASESessionManager
to now take-over the responsibility of free'ing up the proxy instance on error, while still retaining the multi-callback capability of the high-levelFindOrEstablishSession
API.The text was updated successfully, but these errors were encountered: