Initialise playlistFired at definition.
This commit is contained in:
parent
1ed81fdd36
commit
7d447be786
@ -128,7 +128,7 @@ func lastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var playlistWatcher watcher.InotifyWatcher
|
var playlistWatcher watcher.InotifyWatcher
|
||||||
var playlistFired chan uint32
|
var playlistFired chan uint32 = make(chan uint32)
|
||||||
var lastPlayedCache []Song
|
var lastPlayedCache []Song
|
||||||
var lastPlayedCacheMutex sync.Mutex
|
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")
|
return errors.Wrap(err, "cannot set a playlist to watch")
|
||||||
}
|
}
|
||||||
|
|
||||||
playlistFired = make(chan uint32)
|
|
||||||
|
|
||||||
playlistWatcher.WatchForMask(playlistFired, watcher.ModMask)
|
playlistWatcher.WatchForMask(playlistFired, watcher.ModMask)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user