diff --git a/masterelection/masterelection.go b/masterelection/masterelection.go index c73a67f1e0e8704c7140f30440d2671024f722b9..7813d5368376b572cf17c685f5ea5f3420bbdcd6 100644 --- a/masterelection/masterelection.go +++ b/masterelection/masterelection.go @@ -59,7 +59,9 @@ func (m *MasterElection) setState(state int) { if m.State == state { return } - log.Printf("masterelection: status=%s", stateToString(state)) + log.Printf("masterelection: %s -> %s", + stateToString(m.State), + stateToString(state)) if m.StateChange != nil { m.StateChange <- state } diff --git a/node/node.go b/node/node.go index 30ec6458e0060515ce697ab2af89e2a34200e716..40e98937405466d668c272a690b67002d3a1a8ab 100644 --- a/node/node.go +++ b/node/node.go @@ -251,6 +251,9 @@ func (rc *RadioNode) Run() { // Start the presence heartbeat. go rc.presence() + // Start the masterelection runner. + go rc.me.Run() + log.Printf("starting icecast updater") for { select {