]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: peers: keep the earliest sync task deadline
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 16 Oct 2026 08:12:29 +0000 (10:12 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 16 Oct 2026 08:41:24 +0000 (10:41 +0200)
commit5e3037e64ec22ca9e9bd8bbbd5591aeaf72a56aa
treeb74ccc30e46891bcd599a4015622768c15c873eb
parent33656ebb7c862d567912f2b6b5fcf5264c0e2d88
BUG/MEDIUM: peers: keep the earliest sync task deadline

When a peer reconnects, heartbeats to another idle peer may be delayed.
The remote peer may then close the connection due to inactivity.

All peers in a section share one sync task. While processing each peer,
the task's deadline is overwritten, even when an earlier peer needs to
wake up sooner.

Keep the earliest deadline across all peers, both when updates are pending
and when peers are idle.

The faulty assignments were introduced by commit
    045e0d4b3 ("BUG/MINOR: peers: Really close the sessions with no heartbeat.")
during 2.0 development.

Thank you to @snh for having reported this issue in GH #3536.

This fix should be backported to all maintained stable branches.
src/peers.c