]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] stream_sock: always clear BF_EXPECT_MORE upon complete transfer
authorWilly Tarreau <w@1wt.eu>
Wed, 11 May 2011 18:14:03 +0000 (20:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 May 2011 16:42:40 +0000 (18:42 +0200)
commit8f8b4922957548b6e32a996f51b3e58378d39f16
treed8c91db1b3da413c69c2f4c85ed208cdca18c575
parent5c62092ca1ed34bdcbeed7f954076dad2a0ff4f3
[MINOR] stream_sock: always clear BF_EXPECT_MORE upon complete transfer

When sending is complete, it's preferred to systematically clear the flags
that were set for that transfer. What could happen is that the to_forward
counter had caused the MSG_MORE flag to be set and BF_EXPECT_MORE not to
be cleared, resulting in this flag being unexpectedly maintained for next
round.

The code has taken extreme care of not doing this till now, but it's not
acceptable that the caller has to know these precise semantics. So let's
unconditionnally clear the flag instead.

For the sake of safety, this fix should be backported to 1.4.
src/stream_sock.c