innoveit / react-native-ble-manager

React Native BLE communication module
http://innoveit.github.io/react-native-ble-manager/
Apache License 2.0
2.11k stars 761 forks source link

isPeripheralConnected wrong result after reloading #829

Closed wtlyu closed 10 months ago

wtlyu commented 2 years ago

Describe the bug I'm facing a reproducible issue, when I firstly connect the ble device, then use Metro to send reload command, the information between isPeripheralConnected and retrieveServices is conflict.

isPeripheralConnected returns true but retrieveServices throw Device is not connected

To Reproduce Steps to reproduce the behavior:

  1. Connect a ble device
  2. Send r in Metro CLI
  3. call isPeripheralConnected to the same device id: get true
  4. call retrieveServices to the same device id: throw an error, Device is not connected

Expected behavior Seems the devices is actually not connected after reload. So maybe isPeripheralConnected's result is wrong, it should be false.

Smartphone (please complete the following information):

marcosinigaglia commented 10 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.