From: Christopher Faulet Date: Wed, 24 Apr 2024 14:38:13 +0000 (+0200) Subject: BUG/MEDIUM: peers: Reprocess peer state after all session shutdowns X-Git-Tag: v3.0-dev9~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a902e3188b0c8b489fff2c18a6134d385367374;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: peers: Reprocess peer state after all session shutdowns When a session is shut down, the peer is switched in released state (PEER_F_ST_RELEASED) and the sync task must process it to eventually perform some clean up, in case the peer was assigned to learn. However, this was only true when the session was shut down from the peer applet itself. This was not performed when it was shut down from the sync task. It is now fixed. --- diff --git a/src/peers.c b/src/peers.c index 55af758535..cf2d92683b 100644 --- a/src/peers.c +++ b/src/peers.c @@ -3566,6 +3566,7 @@ static void __process_running_peer_sync(struct task *task, struct peers *peers, ps->reconnect = tick_add(now_ms, MS_TO_TICKS(50 + ha_random() % 2000)); ps->heartbeat = TICK_ETERNITY; peer_session_forceshutdown(ps); + __process_peer_state(peers, ps); ps->no_hbt++; } } @@ -3626,6 +3627,7 @@ static void __process_stopping_peer_sync(struct task *task, struct peers *peers, ps->reconnect = tick_add(now_ms, MS_TO_TICKS(50 + ha_random() % 2000)); if (ps->appctx) { peer_session_forceshutdown(ps); + __process_peer_state(peers, ps); } }