From cee34d8f0c5c267d46cd89f09adeca226a27f32e Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Thu, 14 Nov 2013 21:59:43 +0000
Subject: [PATCH] actually start the masterelection runner

---
 masterelection/masterelection.go | 4 +++-
 node/node.go                     | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/masterelection/masterelection.go b/masterelection/masterelection.go
index c73a67f1..7813d536 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 30ec6458..40e98937 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 {
-- 
GitLab