From 265aba028ae220c5a0be049c19024f5b31b78dfc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 22 Sep 2016 23:50:51 +0200 Subject: minor cleanups 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) -- cgit v0.10.2