]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stream-int: clean up the conditions to enable reading in si_conn_wake_cb
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Sep 2015 17:37:00 +0000 (19:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 16:07:16 +0000 (18:07 +0200)
commitea3cc48d6463bdd8fb96963d4bfc82654fb17820
tree2dafb9bf7c1144ad8b09a5bc562fc9d3d8685baf
parent388a2385a52cdc121572e1375b1dd09817be9849
MEDIUM: stream-int: clean up the conditions to enable reading in si_conn_wake_cb

The condition to release the SI_FL_WAIT_ROOM flag was abnormally
complicated because it was inherited from 6 years ago before we used
to check for the buffer's emptiness. The CF_READ_PARTIAL flag had to be
removed, and the complex test was replaced with a simpler one checking
if *some* data were moved out or not.

The reason behind this change is to have a condition compatible with
both connections and applets, as applets currently don't work very
well in this area. Specifically, some optimizations on the applet
side cause them not to release the flag above until the buffer is
empty, which may prevent applets from taking together (eg: peers
over large haproxy buffers and small kernel buffers).
src/stream_interface.c