]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stream_interface: don't loop over ->snd_buf()
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2012 22:27:14 +0000 (23:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Oct 2012 22:30:33 +0000 (23:30 +0100)
commited7f836f07d36f5b0d096b369e6c0c3604c9dbbe
tree93897d0df4af6de7f7ba706d2761e45e10525376
parentcbb9a4b1284c8ec8e89e9ce0d14ae95988e92442
BUG/MINOR: stream_interface: don't loop over ->snd_buf()

It is stupid to loop over ->snd_buf() because the snd_buf() itself already
loops and stops when system buffers are full. But looping again onto it,
we lose the information of the full buffers and perform one useless syscall.

Furthermore, this causes issues when dealing with large uploads while waiting
for a connection to establish, as it can report a server reject of some data
as a connection abort, which is wrong.

1.4 does not have this issue as it loops maximum twice (once for each buffer
half) and exists as soon as system buffers are full. So no backport is needed.
include/common/defaults.h
src/stream_interface.c