Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the OnSessionReleased callback from OperationalSessionSetup. (#…
…26395) Since OperationalSessionSetup is ephemeral, it only holds on to a session while it's notifying its listeners, after which it will delete itself. Right now it was deleting itself from OnSessionReleased, but that means it could end up with a double-delete... and also, it's already notifying listeners if it has a session, so there is no point, or ability, to notify them again on session release. The changes here: 1. Take out the OnSessionReleased that couldn't do anything except lead to use-after-free. 2. Fix a bug on OnSessionEstablished where if we got a session that's not usable we leaked and left our listeners hanging instead of just notifying our listeners with error.
- Loading branch information