1
0

Initialise playlistFired at definition.

This commit is contained in:
Alexander Andreev 2022-04-01 22:35:30 +04:00
parent 1ed81fdd36
commit 7d447be786
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -128,7 +128,7 @@ func lastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
}
var playlistWatcher watcher.InotifyWatcher
var playlistFired chan uint32
var playlistFired chan uint32 = make(chan uint32)
var lastPlayedCache []Song
var lastPlayedCacheMutex sync.Mutex
@ -143,8 +143,6 @@ func IcecastWatchPlaylist(playlistPath string, lastNSongs int) error {
return errors.Wrap(err, "cannot set a playlist to watch")
}
playlistFired = make(chan uint32)
playlistWatcher.WatchForMask(playlistFired, watcher.ModMask)
go func() {