dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
537 stars 197 forks source link

observeConnectionState(emitCurrentValue: true) emits connected state for disconnected device #540

Closed tomrozb closed 3 years ago

tomrozb commented 3 years ago

I found a bug in 2.3.0 version of the library. It can be reproduces with the sample app using iOS device

Reproduction steps:

  1. Connect to any device
  2. Turn off the device
  3. The app should report the device as disconnected
  4. Try to connect to the device
  5. The app reports the device as connected

Also can be reproduced like this:

  1. Scan for devices
  2. Open device details
  3. Turn off the device
  4. Try to connect
  5. The app reports the device as connected