cordova-plugin-ble-central icon indicating copy to clipboard operation
cordova-plugin-ble-central copied to clipboard

Aborting a time-based scan does not disable the stopScan instruction at time end

Open peitschie opened this issue 3 years ago • 0 comments

  1. Start a scan (e.g., 10s)
  2. Wait 5s then abort the scan by calling stopScan
  3. Start another scan (e.g., 20s)

The second scan will abort after only a few moments because the postDelayed message is never cleared when stopScan is called.

See https://github.com/don/cordova-plugin-ble-central/blob/0732380e27772a08df2c6ce6447b4cab901ad4d2/src/android/BLECentralPlugin.java#L988

Noticed while looking at code for #901 901

peitschie avatar Feb 25 '22 08:02 peitschie