If we get a call for an incoming Link we do
not want to hold unless we want to do something with it.
Holding incoming connections can result in never Releasing
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I6607c79e7b3af77334fcc871c0bfe31406050978
void SecurityManagerChannel::OnLinkConnected(std::unique_ptr<l2cap::classic::LinkSecurityInterface> link) {
// Multiple links possible?
- link->Hold();
auto remote = link->GetRemoteAddress();
if (outgoing_pairing_remote_devices_.count(remote) == 1) {
+ link->Hold();
link->EnsureAuthenticated();
outgoing_pairing_remote_devices_.erase(remote);
}