Skip to content

fix: Canceling a connectionState subscription results in hang #14

@jefflongo

Description

@jefflongo

Description

Awaiting a connectionState subscription cancellation never completes.

Steps To Reproduce

subscription = device.connectionState.listen(onConnectionState);
...
await subscription.cancel(); // <-- Hangs here
await device.disconnect();

Expected Behavior
Expected behavior is that the subscription can be canceled so that the app can disconnect from the device without calling onConnectionState.

Additional Context

This code works on Android using the same version of Flutter Blue Plus (1.33.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions