Removed one nesting level by removing select statement.
This commit is contained in:
parent
76b3e2e8ad
commit
5c16576fa4
@ -196,8 +196,8 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
|
|||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
select {
|
mask := <-pw.changed
|
||||||
case mask := <-pw.changed:
|
|
||||||
if mask&syscall.IN_MODIFY > 0 {
|
if mask&syscall.IN_MODIFY > 0 {
|
||||||
lastPlayedCacheMutex.Lock()
|
lastPlayedCacheMutex.Lock()
|
||||||
songs, err := icecastLastPlayedSongs(playlistPath, 1)
|
songs, err := icecastLastPlayedSongs(playlistPath, 1)
|
||||||
@ -224,7 +224,6 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user