From 373034cb3b581e4fc991189057277dc5056c7abd Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 27 Mar 2016 00:37:20 +0100 Subject: some cleanup diff --git a/src/rhctl/audio_switch.go b/src/rhctl/audio_switch.go index 2e0a965..dc1955e 100644 --- a/src/rhctl/audio_switch.go +++ b/src/rhctl/audio_switch.go @@ -144,7 +144,7 @@ func (sw *AudioSwitch) Run() { func SwitchInit(conf *Config) (sw *AudioSwitch, err error) { sw = &AudioSwitch{} sw.timeout = time.Second - if conf.Audioswitch.Timeout.Duration > time.Duration(0) { + if conf.Audioswitch.Timeout.Duration > 0 { sw.timeout = conf.Audioswitch.Timeout.Duration } sw.Commands = make(chan *SwitchCommand, 8) diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go index 5666586..ea99268 100644 --- a/src/rhctl/playout_server.go +++ b/src/rhctl/playout_server.go @@ -79,11 +79,12 @@ func (srv *PlayoutServer) handleControl(data string) { func (srv *PlayoutServer) handleHeartbeat(data string) { rhdl.Printf("Server(%s): got heartbeat message: %q", srv.name, data) srv.hbtimer.Reset(srv.hbtimeout) - old := srv.status.Health srv.hbcnt++ if srv.hbcnt < srv.hbthreshold { return } + + old := srv.status.Health srv.status.Health = ServerAlive if old != srv.status.Health { srv.Updates <- srv.status -- cgit v0.10.2