diff --git a/internal/radio/liquidsoap/liquidsoap.go b/internal/radio/liquidsoap/liquidsoap.go index 1f0de69..eaa4ed3 100644 --- a/internal/radio/liquidsoap/liquidsoap.go +++ b/internal/radio/liquidsoap/liquidsoap.go @@ -38,7 +38,7 @@ func NewLiquidsoap(liquidsoapPath, scriptPath string) (*Liquidsoap, error) { } func (l *Liquidsoap) Stop() error { - if !l.IsRunning() { + if l.command.Process == nil && l.command.ProcessState != nil { return ErrNotRunning } @@ -52,7 +52,3 @@ func (l *Liquidsoap) Stop() error { return nil } - -func (l *Liquidsoap) IsRunning() bool { - return l.command.Process != nil && l.command.ProcessState == nil -}