Skip to content

Commit 59e3af0

Browse files
committed
ipn/proxy: ping on idle instead of Refresh
1 parent 1318a7e commit 59e3af0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

intra/ipn/proxy.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,17 +677,19 @@ func healthy(p Proxy) error {
677677
return err
678678
} // TODO: err on TNT, TKO?
679679

680+
// TODO: via, _ := p.Router().Via()
681+
680682
stat := p.Router().Stat()
681683
now := now()
682684
lastOK := stat.LastOK
683685
lastOKNeverOK := lastOK <= 0
684686
lastOKBeyondThres := now-lastOK > lastOKThreshold.Milliseconds()
685687
if lastOKNeverOK || lastOKBeyondThres {
686-
core.Gx("healthy.notOK."+pid, func() { p.onNotOK() }) // not ok for too long
688+
core.Gx("healthy.TNT."+pid, func() { p.onNotOK() }) // not ok for too long
687689
return fmt.Errorf("proxy: %s not ok; lastOK: zz? %t / thres? %t",
688690
pid, lastOKNeverOK, lastOKBeyondThres)
689691
} else if now-lastOK > tzzTimeout.Milliseconds() {
690-
core.Gx("healthy.timeout."+pid, func() { p.onNotOK() })
692+
core.Gx("healthy.TZZ."+pid, func() { p.Ping() })
691693
} else if p.Status() != TOK {
692694
core.Gx("healthy.TOK."+pid, func() { p.Ping() })
693695
}

0 commit comments

Comments
 (0)