]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stconn: Don't check pending shutdown to wake an applet up
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 12 Feb 2024 17:30:33 +0000 (18:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Feb 2024 13:22:36 +0000 (14:22 +0100)
commit40d98176ba12367ed323edae34373b5f8deaee64
treec7acca92f2cd4b2d60a21baab0cc45cd4d6bf633
parent2c672f282d0ad2ba7721339a8a7e1660f1f46600
BUG/MEDIUM: stconn: Don't check pending shutdown to wake an applet up

This revert of commit 0b93ff8c87 ("BUG/MEDIUM: stconn: Wake applets on
sending path if there is a pending shutdown") and 9e394d34e0 ("BUG/MINOR:
stconn: Don't report blocked sends during connection establishment") because
it was not the right fixes.

We must not wake an applet up when a shutdown is pending because it means
output some data are still blocked in the channel buffer. The applet does
not necessarily consume these data. In this case, the applet may be woken up
infinitly, except if it explicitly reports it wont consume datay yet.

This patch must be backported as far as 2.8. For older versions, as far as
2.2, it may be backported. If so, a previous fix must be pushed to prevent
an HTTP applet to be stuck. In http_ana.c, in http_end_request() and
http_end_reponse(), the call to channel_htx_truncate() on the request
channel in case of MSG_ERROR must be replace by a call to
channel_htx_erase().
include/haproxy/sc_strm.h
src/stconn.c