]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stream: Limit number of synchronous send per stream wakeup
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Feb 2026 06:49:21 +0000 (07:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Feb 2026 12:26:21 +0000 (13:26 +0100)
commit53b7150357b0ca3bfd4af784e349b6f06131baab
tree483292dec2932a0be68ec1d971c76076f82d47b9
parent5965a6e1d2afa8041c4b518f878f3d22066e20e4
MEDIUM: stream: Limit number of synchronous send per stream wakeup

It is not a bug fix, because there is no way to hit the issue for now. But
there is nothing preventing a loop of synchronous sends in process_stream().
Indead, when a synchronous send is successfully performed, we restart the
SCs evaluation and at the end another synchronous send is attempted. So with
an endpoint consuming data bit by bit or with a filter fowarding few bytes
at each call, it is possible to loop for a while in process_stream().

Because it is not expected, we now limit the number of synchronous send per
wakeup to two calls. In a nominal case, it should never be more. This commit
is mandatory to be able to handle large buffers on channels

There is no reason to backport this commit except if the large buffers
support on channels are backported.
include/haproxy/sc_strm.h
src/stconn.c
src/stream.c