Skip to content

Subscribe does not have the same behavior on Linux & WIndows #326

Description

@TristonJ

Describe the bug
Calling Peripheral.subscribe(char) has different behavior depending on if you are using the winrt backend or the bluez backend. On Windows each time you call subscribe a new stream of events is created (potentially resulting in duplicated events from a single characteristic). On linux, you can call subscribe as many times as you please, and each characteristic's events will only appear once in any stream returned from notifications().

This is actually pretty clear to see after looking at the Peripheral.subscribe impl for winrtble.

Expected behavior
I think, ideally, Windows would behave the same as Linux, allowing you to call subscribe multiple times for a single characteristic with no effect.

Actual behavior
Calling subscribe multiple times on windows will result in duplicated events in single stream returned by a call to notifications.

Additional context
None - but thank you for the great library!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions