BUG/MEDIUM: peers: Properly handle shutdown when trying to get a line
Some checks are pending
Contrib / build (push) Waiting to run
alpine/musl / gcc (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run

When a shutdown was reported to a peer applet, the event was not properly
handled if it failed to receive data. The function responsible to get data
was exiting too early if the applet buffer was empty, without testing the
sedesc status. Because of this issue, it was possible to have frozen peer
applets. For instance, it happend on client timeout. With too many frozen
applets, it was possible to reach the maxconn.

This patch should fix the issue #3234. It must be backported to 3.3.
This commit is contained in:
Christopher Faulet 2026-01-05 11:12:00 +01:00
parent 196d16f2b1
commit 0b29b76a52

View file

@ -1212,7 +1212,7 @@ static inline int peer_getline(struct appctx *appctx)
int n = 0;
TRACE_ENTER(PEERS_EV_SESS_IO|PEERS_EV_RX_MSG, appctx);
if (applet_get_inbuf(appctx) == NULL || !applet_input_data(appctx)) {
if (applet_get_inbuf(appctx) == NULL) {
applet_need_more_data(appctx);
goto out;
}