Polidea / RxBluetoothKit

iOS & OSX Bluetooth library for RxSwift
Apache License 2.0
1.41k stars 366 forks source link

Fix for problem when service discovery process gets stuck #327

Closed vladiulianbogdan closed 5 years ago

vladiulianbogdan commented 5 years ago

This is related to this issue.

What was happening is that if a disconnect occurs right after the discoverServices(nil) call and the discovery response was not yet received, future discoverServices calls will never return anything because the remainingServicesDiscoveryRequest is unbalanced (it was incremented but it was never decremented because of the disconnect event).

It is the same problem for discoverCharacteristics and discoverIncludedServices.

CLAassistant commented 5 years ago

CLA assistant check
All committers have signed the CLA.