tun2: only log failure chance if it's nonzero
This commit is contained in:
parent
b1161e35f4
commit
581420b768
|
@ -165,10 +165,12 @@ func (s *Server) ListenAndServe() error {
|
||||||
for _, c := range s.conns {
|
for _, c := range s.conns {
|
||||||
failureChance := c.detector.Phi(now)
|
failureChance := c.detector.Phi(now)
|
||||||
|
|
||||||
ln.Log(c.F(), ln.F{
|
if failureChance != 0 {
|
||||||
"action": "phi_failure_detection",
|
ln.Log(c.F(), ln.F{
|
||||||
"value": failureChance,
|
"action": "phi_failure_detection",
|
||||||
})
|
"value": failureChance,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
s.connlock.Unlock()
|
s.connlock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue