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

Commit 19623b6c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "L2CAP: Delete callbacks from queue after use"

parents 09706a44 c3a296f7
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);