Skip to content

[BluetoothLEHelper] await services subscriptions #2871

@GeertvanHorrik

Description

@GeertvanHorrik

I'm submitting a...

  • Bug report (I searched for similar issues and did not find one)

Current behavior

The services registration happens in ObservableBluetoothLEDevice.ConnectAsync. However, the services characteristics are being initialized in an non-async way in the service ctor.

Expected behavior

After await ConnectAsync, I would expect a fully available object (with services), which is not the case.

How to fix

My recommendation is to fix this by adding an Task InitializeAsync method to ObservableGattDeviceService. Then this can be called from within the ConnectAsync method and actually be awaited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviorhelp wantedIssues identified as good community contribution opportunitieshelpers ✋

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions