chrvadala / node-ble

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
https://www.npmjs.com/package/node-ble
MIT License
320 stars 47 forks source link

Device (properties) event listener leak #35

Closed tuxedoxt closed 9 months ago

tuxedoxt commented 2 years ago

Hello,

using Adapter.getDevice followed by any property getter like Device.getName seems to leave PropertiesChanged event listeners.

Using device Device.disconnect (even when never having used Device.connect) removes listeners on Device.helper but not on Device.helper._propsProxy.

This is one of two issues I noticed while repeatedly trying to enumerate a devices and read some properties from them (in a heavy BLE traffic area).