diff --git a/cmd/dwelling-radio/main.go b/cmd/dwelling-radio/main.go index 6634e8a..48298f2 100644 --- a/cmd/dwelling-radio/main.go +++ b/cmd/dwelling-radio/main.go @@ -34,15 +34,10 @@ func main() { log.Fatalln(err) } + if typ, addr := config.SplitNetworkAddress(); typ == "unix" { + defer os.Remove(addr) } - defer func() { - if typ, addr := config.SplitNetworkAddress(); typ == "unix" { - os.Remove(addr) - } - }() - - playlistWatcher := radio.NewPlaylistLogWatcher() if err := playlistWatcher.Watch(config.Icecast.Playlist, config.ListLastNSongs); err != nil { log.Fatalln(err)