BUG/MINOR: server: fix down_time report for stats
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 29 Oct 2020 14:59:05 +0000 (15:59 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Oct 2020 17:52:39 +0000 (18:52 +0100)
commite6ba7915ebdfb79d1d74eb402bbc2747c4a1c6dd
tree702989de510d3904ae63cab6ca63d01928732970
parentfe2bf091f6f2c155b5d7b1372a43b73bb034002f
BUG/MINOR: server: fix down_time report for stats

Adjust condition used to report down_time for statistics. There was a
tiny probabilty to have a negative downtime if last_change was superior
to now. If this is the case, return only down_time.

This bug can backported up to 1.8.
src/server.c