Skip to content

[Linux] Stop stale playback listeners when AirPods reconnect #683

Description

@mmatczuk

Problem

AirPods reconnection constructs a new MediaController, but the playback listener owned by the previous controller loops forever. The per-controller running flag cannot see older instances, so listeners accumulate and can react to the same playback transition concurrently, including overlapping A2DP recovery work.

Expected behavior

Starting a listener for a device should stop the previous listener for the same Bluetooth MAC. Listeners belonging to different connected AirPods must remain independent.

Acceptance criteria

  • Reconnecting the same AirPods leaves one active playback listener for that MAC.
  • A superseded listener cannot continue into playback takeover side effects.
  • Starting a listener for a second MAC does not stop the first device listener.
  • The replacement behavior has an automated lifecycle test.

Metadata

Metadata

Assignees

No one assigned

    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