Bug:
36026072
Test: Switch users (toggle Bluetooth under load)
Change-Id: I3fb901b5c47021c708c1fb548858406225065d00
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);