summaryrefslogtreecommitdiff
path: root/src/rhctl
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-26 23:37:20 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-26 23:37:20 (GMT)
commit373034cb3b581e4fc991189057277dc5056c7abd (patch)
tree4a5dc6feecec51a897c7957e8b78c4aa60ffb612 /src/rhctl
parent25df91a97bdcd5d573083df1bf3dc6d5ff1ca9c4 (diff)
some cleanup
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