BUG/MINOR: peers: make sure to always apply offsets to now_ms in expiration
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Nov 2024 14:44:05 +0000 (15:44 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Nov 2024 14:35:13 +0000 (15:35 +0100)
commit9d74f3692bfbcf87dff1e2a17a6fdf3a22307f9f
tree660105dfaf12165f2f5dd0284049e1f04f77cece
parentb8c4edbc49aa528081baa338529797676fc91095
BUG/MINOR: peers: make sure to always apply offsets to now_ms in expiration

Now_ms can be zero nowadays, so it's not suitable for direct assignment to
t->expire, as there's a risk that the timer never wakes up once assigned
(TICK_ETERNITY). Let's use tick_add(now_ms, 0) for an immediate wakeup
instead. The impact here might be a reconnect programmed upon signal
receipt at the wrapping date not having a working timeout.

This should be backported where it applies.

(cherry picked from commit ed55ff878d5af35dae70f78023ab2141d36e5866)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/peers.c