start_scan when scanning is already in progress
hansmbakker opened this issue · comments
Hans Bakker commented
If for some reason Adapter.start_scan()
is called multiple times (e.g. because of running an app multiple time before the first scan is stopped) then I get an error on Linux:
DbusError(D-Bus error: Operation already in progress (org.bluez.Error.InProgress))
I believe there is currently no way to do this safe. The Adapter.session
property is private and I'm not sure if that would give a way to check whether a scan is in progress.
Platform: linux
Btleplug version: 0.9.2
Yohann commented
What I did to hotfix this bug in my program is to call Adapter.stop_scan()
before any adapter.start_scan()