1
0

First check if a unix socket used and only then defer a removing of it.

This commit is contained in:
Alexander Andreev 2023-02-07 02:31:30 +04:00
parent 3eb739bc28
commit ca8613745f
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -34,14 +34,9 @@ func main() {
log.Fatalln(err)
}
}
defer func() {
if typ, addr := config.SplitNetworkAddress(); typ == "unix" {
os.Remove(addr)
defer os.Remove(addr)
}
}()
playlistWatcher := radio.NewPlaylistLogWatcher()
if err := playlistWatcher.Watch(config.Icecast.Playlist, config.ListLastNSongs); err != nil {