MediaTek-Labs / Arduino-Add-On-for-LinkIt-SDK

Arduino board support package for LinkIt 7697
https://docs.labs.mediatek.com/resource/linkit7697-arduino/en
34 stars 33 forks source link

Fix BLEClient multiple connect() issue #46

Closed pablosun closed 7 years ago

pablosun commented 7 years ago

BLE framework resource leaks when connect() to a non-existent address. The resource needs to be reclaimed by a "cancel connection" API call. LBLECentral may report a non-existent address because it does not clear old scan entries. Most BLE devices change their device address after a period of time, for privacy reasons. Therefore:

This should fix the underlying resource leak.