diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index 7fe8c2c..ded957a 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -152,11 +152,11 @@ func IcecastWatchPlaylist(playlistPath string, lastNSongs int) error { select { case <-playlistFired: lastPlayedCacheMutex.Lock() - defer lastPlayedCacheMutex.Unlock() songs, err := lastPlayedSongs(lastNSongs, playlistPath) if err == nil && len(songs) > 0 { lastPlayedCache = songs } + lastPlayedCacheMutex.Unlock() } } }()