First check if a unix socket used and only then defer a removing of it.
This commit is contained in:
parent
3eb739bc28
commit
ca8613745f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user