tun2: only log failure chance if it's nonzero

This commit is contained in:
Cadey Ratio 2017-04-05 15:23:13 -07:00
parent b1161e35f4
commit 581420b768
1 changed files with 6 additions and 4 deletions

View File

@ -165,11 +165,13 @@ func (s *Server) ListenAndServe() error {
for _, c := range s.conns {
failureChance := c.detector.Phi(now)
if failureChance != 0 {
ln.Log(c.F(), ln.F{
"action": "phi_failure_detection",
"value": failureChance,
})
}
}
s.connlock.Unlock()
}
}()