Peripheral::discover_services() on CoreBluetooth can hang forever on several paths:
src/corebluetooth/internal.rs discover_services() (~L1494): no else branch — if the peripheral is not in the map (e.g. after disconnect removal or clear_peripherals), the future is never completed.
src/corebluetooth/central_delegate.rs didDiscoverServices (~L514): when error is Some, no event is sent, so the pending future is never resolved.
central_delegate.rs didDiscoverCharacteristicsForService (~L572): on error no event is sent, so that service never becomes discovered and check_discovered never fires.
- A peripheral with zero services never calls
check_discovered (only set_characteristics triggers it).
Fix direction: reply with an error for missing peripherals / delegate errors, and resolve immediately for an empty service set.
Peripheral::discover_services()on CoreBluetooth can hang forever on several paths:src/corebluetooth/internal.rsdiscover_services()(~L1494): noelsebranch — if the peripheral is not in the map (e.g. after disconnect removal orclear_peripherals), the future is never completed.src/corebluetooth/central_delegate.rsdidDiscoverServices(~L514): whenerrorisSome, no event is sent, so the pending future is never resolved.central_delegate.rsdidDiscoverCharacteristicsForService(~L572): on error no event is sent, so that service never becomesdiscoveredandcheck_discoverednever fires.check_discovered(onlyset_characteristicstriggers it).Fix direction: reply with an error for missing peripherals / delegate errors, and resolve immediately for an empty service set.