BUG/MEDIUM: peers: Don't use resync timer when local resync is in progress

When a worker is stopped, the resync timer is used to limit in time the
connection stage to the new worker to perform the local resync. However,
this timer must be stopped when the resync is in progress and it must be
re-armed if the resync is interrupted (for instance because another
reload). Otherwise, if the resync is a bit long, an old worker may be killed
too early.

This bug was introduce by the commit 160fff665 ("BUG/MEDIUM: peers: limit
reconnect attempts of the old process on reload"). It must be backported as
far as 2.0.

(cherry picked from commit 19a82b94953ae06839b34df2fc1e57847bef7c50)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 36581bfa58735e6f5fd50cd35da99aa75d56e559)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit bf11a44f94f919797ea8570924c17333136b2a87)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed