You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two reachable panics in CoreBluetooth discovery run on the CB event-loop thread. When they fire, the thread dies and every subsequent/in-flight operation hangs or fails with "Channel closed".
src/corebluetooth/internal.rscheck_discovered (~L345): panic!("We should still have a future at this point!"). set_characteristic_descriptors calls check_discovered whenever all characteristics are discovered; after the first discovery completes services_discovered_future_state is None, so any late descriptor callback (re-discovery, included service that is also primary, see Race condition causes panic on subscription in CoreBluetooth #167) panics.
internal.rsset_characteristics (~L276): .expect("Got characteristics for a service we don't know about"). central_delegate.rs requests characteristics for included services, which aren't in the service map from discoverServices(nil); also reachable after on_services_modified clears services while characteristic callbacks are in flight.
Fix direction: treat both as benign (trace-log and ignore / no-op when there is no waiting future or unknown service).
Two reachable panics in CoreBluetooth discovery run on the CB event-loop thread. When they fire, the thread dies and every subsequent/in-flight operation hangs or fails with "Channel closed".
src/corebluetooth/internal.rscheck_discovered(~L345):panic!("We should still have a future at this point!").set_characteristic_descriptorscallscheck_discoveredwhenever all characteristics are discovered; after the first discovery completesservices_discovered_future_stateisNone, so any late descriptor callback (re-discovery, included service that is also primary, see Race condition causes panic on subscription in CoreBluetooth #167) panics.internal.rsset_characteristics(~L276):.expect("Got characteristics for a service we don't know about").central_delegate.rsrequests characteristics for included services, which aren't in the service map fromdiscoverServices(nil); also reachable afteron_services_modifiedclears services while characteristic callbacks are in flight.Fix direction: treat both as benign (trace-log and ignore / no-op when there is no waiting future or unknown service).