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

Commit a382d201 authored by Krzysztof Kopyściński's avatar Krzysztof Kopyściński
Browse files

has_client.cc: add missing BTA_GATTC_CancelOpen in Disconnect

Registrations for connection shall be removed when disconnecting.

Bug: 370405555
Bug: 361014973
Test: atest --host --no-bazel-mode HasClientTest
Flag: com.android.bluetooth.flags.hap_connect_only_requested_device
Change-Id: I03ee326147f6d2e56fb0fd684a14ebd857615f5d
parent a1f6bd5d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -256,6 +256,9 @@ public:
        if (is_connecting_actively) {
          BTA_GATTC_CancelOpen(gatt_if_, address, true);
          callbacks_->OnConnectionState(ConnectionState::DISCONNECTED, address);
        } else {
          /* Removes all registrations for connection. */
          BTA_GATTC_CancelOpen(gatt_if_, address, false);
        }
      }
      return;