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

Commit 23cdddd2 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Clean connecting_actively_ flag

If disconnect was called while connection was not yet
established, we should clear the flag

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: atest --host bluetooth_le_audio_test bluetooth_le_audio_client_test

Change-Id: I590f211a776a2872e694579d4f985958a9889839
parent d05ca97f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -731,8 +731,10 @@ class LeAudioClientImpl : public LeAudioClient {
    }

    /* cancel pending direct connect */
    if (leAudioDevice->connecting_actively_)
    if (leAudioDevice->connecting_actively_) {
      BTA_GATTC_CancelOpen(gatt_if_, address, true);
      leAudioDevice->connecting_actively_ = false;
    }

    /* Removes all registrations for connection */
    BTA_GATTC_CancelOpen(0, address, false);