BUG/MEDIUM: stconn: Update fsb date on partial sends
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 15 Nov 2023 16:33:06 +0000 (17:33 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Nov 2023 11:13:00 +0000 (12:13 +0100)
commitb68c579eda648090f14e977ce84ef816a4b4200d
treee12aea2c7336d809c4e506bdba0f2f59869a6eb1
parentf1f8e2b3df7cea8235604ef24479f6497cd00202
BUG/MEDIUM: stconn: Update fsb date on partial sends

The first-send-blocked date was originally designed to save the date of the
first send of a series where some data remain blocked. It was relaxed
recently (3083fd90e "BUG/MEDIUM: stconn: Report a send activity everytime
data were sent") to save the date of the first full blocked send. However,
it is not accurrate.

When all data are sent, the fsb value must be reset to TICK_ETERNITY. When
nothing is sent and if it is not already set, it must be set. But when data
are partially sent, the value must be updated and not reset. Otherwise the
write timeout may be ignored because fsb date is never set.

So, changes brought by the patch above are reverted and
sc_ep_report_blocked_send() was changed to know if some data were sent or
not. This way we are able to update fsb value.
l
This patch must be backported to 2.8.
include/haproxy/stconn.h
src/applet.c
src/stconn.c