Skip to content

Client design makes it too easy to leak bluetooth notify callbacks on disconnect #667

Open
@bdraco

Description

@bdraco

The current design of bluetooth_gatt_start_notify returns two callables:

  • One that the caller must call when the device disconnects
  • One that the caller must call to unsubscribe from a notification

We should only return one callable and handle cleaning up disconnecting the callback in _on_bluetooth_device_connection_response so callers can't get it wrong and leak a callback

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions