summaryrefslogtreecommitdiff
path: root/src/rhctl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhctl')
-rw-r--r--src/rhctl/audio_switch.go2
-rw-r--r--src/rhctl/playout_server.go3
2 files changed, 3 insertions, 2 deletions
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