diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-09-22 21:50:51 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-09-22 22:49:28 (GMT) |
commit | 265aba028ae220c5a0be049c19024f5b31b78dfc (patch) | |
tree | 991afcccd5214f6195ebfc86ce37f6e24b9fd935 | |
parent | f067dae87d4d95fb05de64da27c2c35a68d37c2a (diff) |
minor cleanups
-rw-r--r-- | src/rhctl/main.go | 13 | ||||
-rw-r--r-- | src/rhctl/playout_server.go | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/rhctl/main.go b/src/rhctl/main.go index b1df1a9..86e7aec 100644 --- a/src/rhctl/main.go +++ b/src/rhctl/main.go @@ -95,15 +95,14 @@ func main() { } servers = append(servers, server) } - // TODO: re-enable this check - // if len(servers) <= 0 { - // rhl.Printf("Error: there is no playout server configured...") - // return - // } + if len(servers) <= 0 { + rhl.Printf("Error: there is no playout server configured...") + return + } ctrl := SwitchControlInit(conf, sw, servers) - // initializing non-essential parts aka clients + // initializing non-essential parts, like control-interfaces aka clients telnet := TelnetInit(conf, ctrl) //************************************************** @@ -133,7 +132,7 @@ func main() { stop <- true }() - // running non-essential parts aka clients + // running non-essential parts if conf.Clients.Telnet.Address != "" { go func() { rhl.Printf("starting telnet interface") diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go index 5fc1dfd..9589065 100644 --- a/src/rhctl/playout_server.go +++ b/src/rhctl/playout_server.go @@ -65,7 +65,6 @@ type PlayoutServer struct { } func (srv *PlayoutServer) handleHeartbeat() { - rhdl.Printf("Server(%s): got heartbeat message", srv.name) srv.hbtimer.Reset(srv.hbtimeout) if (srv.hbcnt + 1) < srv.hbthreshold { srv.hbcnt++ @@ -85,12 +84,13 @@ func (srv *PlayoutServer) handleHeartbeat() { } func (srv *PlayoutServer) handleMessage(data string) { - rhdl.Printf("Server(%s): got message: %q", srv.name, data) - if data == "hb" { + // rhdl.Printf("Server(%s): got heartbeat message", srv.name) srv.handleHeartbeat() return } + + rhdl.Printf("Server(%s): got message: %q", srv.name, data) if strings.HasPrefix(data, "channel ") { if len(data) <= 8 { rhl.Printf("Server(%s) sent empty channel name", srv.name) |