1
0

Removed one nesting level by removing select statement.

This commit is contained in:
Alexander Andreev 2023-08-21 06:08:21 +04:00
parent 76b3e2e8ad
commit 5c16576fa4
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -196,8 +196,8 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
go func() {
for {
select {
case mask := <-pw.changed:
mask := <-pw.changed
if mask&syscall.IN_MODIFY > 0 {
lastPlayedCacheMutex.Lock()
songs, err := icecastLastPlayedSongs(playlistPath, 1)
@ -224,7 +224,6 @@ func (pw *PlaylistLogWatcher) Watch(playlistPath string, n int) (err error) {
return
}
}
}
}()
return nil