mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
BUG/MINOR: stream-int: don't set MSG_MORE on SHUTW_NOW without AUTO_CLOSE
Since around 1.5-dev12, we've been setting MSG_MORE on send() on various conditions, including the fact that SHUTW_NOW is present, but we don't check that it's accompanied with AUTO_CLOSE. The result is that on requests immediately followed by a close (where AUTO_CLOSE is not set), the request gets delayed in the TCP stack before being sent to the server. This is visible with the H2 code where the end-of-stream flag is set on requests, but probably happens when a POLL_HUP is detected along with the request. The (lack of) presence of option abortonclose has no effect here since we never send the SHUTW along with the request. This fix can be backported to 1.7, 1.6 and 1.5.
This commit is contained in:
parent
953917abc9
commit
4ac4928718
@ -655,7 +655,8 @@ static void si_conn_send(struct connection *conn)
|
|||||||
|
|
||||||
if ((!(oc->flags & (CF_NEVER_WAIT|CF_SEND_DONTWAIT)) &&
|
if ((!(oc->flags & (CF_NEVER_WAIT|CF_SEND_DONTWAIT)) &&
|
||||||
((oc->to_forward && oc->to_forward != CHN_INFINITE_FORWARD) ||
|
((oc->to_forward && oc->to_forward != CHN_INFINITE_FORWARD) ||
|
||||||
(oc->flags & CF_EXPECT_MORE))) || (oc->flags & CF_SHUTW_NOW))
|
(oc->flags & CF_EXPECT_MORE))) ||
|
||||||
|
((oc->flags & (CF_AUTO_CLOSE|CF_SHUTW_NOW)) == (CF_AUTO_CLOSE|CF_SHUTW_NOW)))
|
||||||
send_flag |= CO_SFL_MSG_MORE;
|
send_flag |= CO_SFL_MSG_MORE;
|
||||||
|
|
||||||
if (oc->flags & CF_STREAMER)
|
if (oc->flags & CF_STREAMER)
|
||||||
|
Loading…
Reference in New Issue
Block a user