Skip to content
Snippets Groups Projects
Commit 51d195b8 authored by ale's avatar ale
Browse files

do not forget to start the icecast status checker

parent fc2d9387
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import (
"encoding/xml"
"errors"
"io"
"log"
"net/http"
"os"
"os/exec"
......@@ -84,6 +85,7 @@ func (ic *IcecastController) statusUpdater() {
if status, err := ic.fetchStatus(); err == nil {
ic.status = status
} else {
log.Printf("bad status from iceast: %v", err)
ic.status = downStatus
}
case <-ic.stop:
......@@ -111,5 +113,5 @@ func (ic *IcecastController) parseStatusPage(input io.Reader) (*IcecastStatus, e
}
func (ic *IcecastController) Run() {
go ic.statusUpdater()
ic.statusUpdater()
}
......@@ -279,6 +279,9 @@ func (rc *RadioNode) Run() {
// initialize.
time.Sleep(200 * time.Millisecond)
// Start the Icecast status checker.
go rc.icecast.Run()
log.Printf("starting icecast updater")
for {
select {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment