BUG/MINOR: server: fix srv downtime calcul on starting
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 29 Oct 2020 14:59:04 +0000 (15:59 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Oct 2020 17:52:18 +0000 (18:52 +0100)
commitfe2bf091f6f2c155b5d7b1372a43b73bb034002f
tree881312701d0969415021145b8c26817ca552c14b
parent66942c1d4d4e17df2d17e8246e4ce101ec51a583
BUG/MINOR: server: fix srv downtime calcul on starting

When a server is up after a failure, its downtime was reset to 0 on the
statistics. This is due to a wrong condition that causes srv.down_time
to never be set. Fix this by updating down_time each time the server is in
STARTING state.

Fixes the github issue #920.
This bug can be backported up to 1.8.
src/server.c