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

Skip to content
Commit 75a56d59 authored by Hsin-chen Chuang's avatar Hsin-chen Chuang
Browse files

floss: Fix racing in start/stop scan

Consider the following race:
1. The 1st StartScan is called with filter:
     has_active_unfiltered_scanner = false
2. The 2nd StartScan is called without filter:
     has_active_unfiltered_scanner = true
3. Async task of the 2nd StartScan is done -> Unfiltered scanning mode
4. Async task of the 1st StartScan is done -> MSFT scanning mode
==> Want unfiltered scan, but got MSFT scan

This patch move the decision into the async tasks, so it is protected
by the lock and the real executing order doesn't matter.

Bug: 279233527
Tag: #floss
Test: Manual test
Change-Id: Ib41d2bbf965a81edce23d62ae6df9832362fc1af
parent e1aabebe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment