From: Christopher Faulet Date: Thu, 1 Aug 2024 15:09:06 +0000 (+0200) Subject: BUG/MEDIUM: peer: Notify the applet won't consume data when it waits for sync X-Git-Tag: v3.0.5~57 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=136fe7e3c1ce09fae6e22eee3487418719ef8e22;p=haproxy-3.0.git BUG/MEDIUM: peer: Notify the applet won't consume data when it waits for sync When the peer applet is waiting for a synchronisation with the global sync task, we must notify it won't consume data. Otherwise, if some data are already waiting in the input buffer, the applet will be woken up in loop and this wil trigger the watchdog. Once synchronized, the applet is woken up. In that case, the peer applet must indicate it is going to consume data again. This patch should fix the issue #2656. It must be backported to 3.0. (cherry picked from commit 78b8b6003082b54a24fa7b13be954f73248cc9d4) Signed-off-by: Christopher Faulet --- diff --git a/src/peers.c b/src/peers.c index 96f6de9..145d669 100644 --- a/src/peers.c +++ b/src/peers.c @@ -3080,8 +3080,11 @@ switchstate: } } - if (curpeer->flags & PEER_F_WAIT_SYNCTASK_ACK) + if (curpeer->flags & PEER_F_WAIT_SYNCTASK_ACK) { + applet_wont_consume(appctx); goto out; + } + applet_will_consume(appctx); /* local peer is assigned of a lesson, start it */ if (curpeer->learnstate == PEER_LR_ST_ASSIGNED && curpeer->local)