Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3948d36 authored by Hansong Zhang's avatar Hansong Zhang Committed by android-build-merger
Browse files

Merge "L2CAP: Delete callbacks from queue after use"

am: 19623b6c

Change-Id: I762166f52192ba6e4fb4837932109692206f34e8
parents 347a5b0f 19623b6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,8 +133,8 @@ void LinkManager::OnConnectSuccess(std::unique_ptr<hci::AclConnection> acl_conne
  if (pending_dynamic_channels_.find(device) != pending_dynamic_channels_.end()) {
    for (Psm psm : pending_dynamic_channels_[device]) {
      auto& callbacks = pending_dynamic_channels_callbacks_[device].front();
      pending_dynamic_channels_callbacks_[device].pop_front();
      link->SendConnectionRequest(psm, link->ReserveDynamicChannel(), std::move(callbacks));
      pending_dynamic_channels_callbacks_[device].pop_front();
    }
    pending_dynamic_channels_.erase(device);
    pending_dynamic_channels_callbacks_.erase(device);