EEBus: fix failsafe limit not left (#25578)
This commit is contained in:
parent
8358816eed
commit
97e8ac19cd
1 changed files with 3 additions and 2 deletions
|
|
@ -172,7 +172,8 @@ func (c *EEBus) Run() {
|
|||
// TODO check state machine against spec
|
||||
func (c *EEBus) run() error {
|
||||
c.mux.RLock()
|
||||
defer c.mux.RUnlock()
|
||||
c.mux.Lock()
|
||||
defer c.mux.Unlock()
|
||||
|
||||
c.log.TRACE.Println("status:", c.status)
|
||||
|
||||
|
|
@ -219,7 +220,7 @@ func (c *EEBus) run() error {
|
|||
|
||||
case StatusFailsafe:
|
||||
// LPC-914/2
|
||||
if d := c.failsafeDuration; heartbeatErr == nil && time.Since(c.statusUpdated) > d {
|
||||
if d := c.failsafeDuration; heartbeatErr == nil || time.Since(c.statusUpdated) > d {
|
||||
c.log.DEBUG.Println("heartbeat returned and failsafe duration exceeded- return to normal")
|
||||
c.setStatusAndLimit(StatusUnlimited, 0)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue