diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-09-24 12:05:35 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-09-24 12:05:35 (GMT) |
commit | 301ad925c1e202f4264ae5d45e21e4f0a837458c (patch) | |
tree | 13f1b7cba52e65e59d0853c724e450ec8c07a573 /src/rhctl/switch_control.go | |
parent | e9ebe0a8ed3416938e4a703750628bc57951dc74 (diff) |
changed vs. updated
Diffstat (limited to 'src/rhctl/switch_control.go')
-rw-r--r-- | src/rhctl/switch_control.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rhctl/switch_control.go b/src/rhctl/switch_control.go index cd66161..1cfd4f8 100644 --- a/src/rhctl/switch_control.go +++ b/src/rhctl/switch_control.go @@ -148,30 +148,30 @@ func handleServer(sin <-chan ServerState, sout chan<- ServerState, cin <-chan Co } func (ctrl *SwitchControl) checkMissingOrStaleStates(maxAge time.Duration) (isStale bool) { - if time.Since(ctrl.state.Switch.AudioInputsChanged) > maxAge { + if time.Since(ctrl.state.Switch.AudioInputsUpdated) > maxAge { ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateAudio, nil, nil} isStale = true } - if time.Since(ctrl.state.Switch.AudioSilenceChanged) > maxAge { + if time.Since(ctrl.state.Switch.AudioSilenceUpdated) > maxAge { ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateSilence, nil, nil} isStale = true } - if time.Since(ctrl.state.Switch.GPIChanged) > maxAge { + if time.Since(ctrl.state.Switch.GPIUpdated) > maxAge { ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateGPIAll, nil, nil} isStale = true } - if time.Since(ctrl.state.Switch.RelayChanged) > maxAge { + if time.Since(ctrl.state.Switch.RelayUpdated) > maxAge { ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateRelay, nil, nil} isStale = true } - if time.Since(ctrl.state.Switch.OCChanged) > maxAge { + if time.Since(ctrl.state.Switch.OCUpdated) > maxAge { ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateOC, nil, nil} isStale = true } for _, server := range ctrl.servers { s, exists := ctrl.state.Server[server.name] - if !exists || time.Since(s.Changed) > maxAge { + if !exists || time.Since(s.Updated) > maxAge { server.UpdateRequest <- true isStale = true } |