diff --git a/masterelection/masterelection.go b/masterelection/masterelection.go index e7ec6286d3662b28bfdd6664d4d278960cc6b57b..897037b70a354626b382487cc984289f5af4c7e3 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 49afdc90fbb4cbf48776dae5635cc77a03dca2a4..0faa5493e4e319ab6afd0b522adabb5849dfb4a9 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 {