RobotPajamas / SwiftyTeeth

A simple, lightweight library intended to take away some of the cruft and tediousness of using CoreBluetooth
Apache License 2.0
23 stars 8 forks source link

feature/23-clear-queue - Clear OperationQueue on disconnection #49

Closed sureshjoshi closed 4 years ago

sureshjoshi commented 4 years ago

Closes issue #23 Related to issue #27

There are some edge cases that I've recently run into where the execute function fires, the peripheral disconnects, and then we never get the callback. Then, we can't re-discover services, because there is an unclearable item in the front of the queue

Currently, isCancelled is checked only BEFORE the operation starts executing, not during.