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

Commit 17b6a836 authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

hci: Close the HAL before cleaning up pending command queue and timers am:...

hci: Close the HAL before cleaning up pending command queue and timers am: 9bdfffdc am: 68318be9
am: 470375dc

Change-Id: Ied7411f26b439babe4d7a654c15f2fe43a6ae8ee
parents 3a7f0df8 470375dc
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -220,6 +220,14 @@ error:
static future_t* hci_module_shut_down() {
  LOG_INFO(LOG_TAG, "%s", __func__);

  // Free the timers
  alarm_free(command_response_timer);
  command_response_timer = NULL;
  alarm_free(startup_timer);
  startup_timer = NULL;

  hci_close();

  if (thread) {
    thread_stop(thread);
    thread_join(thread);
@@ -234,14 +242,6 @@ static future_t* hci_module_shut_down() {

  packet_fragmenter->cleanup();

  // Free the timers
  alarm_free(command_response_timer);
  command_response_timer = NULL;
  alarm_free(startup_timer);
  startup_timer = NULL;

  hci_close();

  thread_free(thread);
  thread = NULL;