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>
Tue, 3 Nov 2020 15:17:20 +0000 (16:17 +0100)
commitfa74247fea0998dd531ae092dd3da101f85dfdcb
treeed3136eb3453b65500608c0d3c0fefe37c74f8f6
parentd3c1b831ee4f6ea662fdde5bf4241dd1e7893cc3
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.

(cherry picked from commit fe2bf091f6f2c155b5d7b1372a43b73bb034002f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 774d5a3b69bf8c588c26ce09a6acbf29997a82ac)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/server.c