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

Commit 072f555d authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

hci: Stop the thread before hci_close() am: 29c4eab0

am: fda6ce8a

Change-Id: Ic39449b6f6551546b5e748e035fb87b5561450f5
parents 9b1bbc76 fda6ce8a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -226,13 +226,15 @@ static future_t* hci_module_shut_down() {
  alarm_free(startup_timer);
  startup_timer = NULL;

  hci_close();

  // Stop the thread to prevent Send() calls.
  if (thread) {
    thread_stop(thread);
    thread_join(thread);
  }

  // Close HCI to prevent callbacks.
  hci_close();

  fixed_queue_free(command_queue, osi_free);
  command_queue = NULL;
  fixed_queue_free(packet_queue, buffer_allocator->free);