fossisawesome-macbook-with-linux 2239b48ea2 fix(jukebox): serialize playbackDevice state with a mutex
ActiveTrack and PlaybackQueue were mutated concurrently by HTTP
handlers (Get/Status/Skip/Start/...) and the background
trackSwitcherGoroutine with no synchronization. Under concurrent
jukebox polling this let ActiveTrack get stuck pointing at a track
whose mpv process had already exited, so subsequent Status calls hit
"trying to send command on closed mpv client" and the queue never
advanced to the next song.

Adds a mutex to playbackDevice, held by every public method and by
the trackSwitcher goroutine's track-swap. Public methods delegate to
internal *Locked helpers to avoid self-deadlock when one action calls
another (e.g. Skip -> start, Set -> clear+add).

Fixes #5660

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-03 15:46:10 -04:00
..
2026-05-20 17:43:12 -03:00
2026-05-28 22:13:05 -03:00
2026-02-08 09:57:30 -05:00