troystribling / BlueCap

iOS Bluetooth LE framework
MIT License
714 stars 114 forks source link

Fixes: retain cycles prevent CBPeripheral objects to be removed #17

Closed zittix closed 8 years ago

zittix commented 8 years ago

This patches clear out the StreamPromise when the scanning is stopped. This allows the CBPeripheral to be correctly released.

It also force the scanning to be stopped after a timeout (which wasn't the case before) and make sure the timeout failure promise is called only if the scanning wasn't stopped before.

Should fix #16