]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[OPTIM] stream_sock: do not ask for polling on EAGAIN if we have read
authorWilly Tarreau <w@1wt.eu>
Thu, 8 Jan 2009 09:09:08 +0000 (10:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Jan 2009 09:15:03 +0000 (10:15 +0100)
commitaf78d0fdb614b3fcc811433a25555e1a5f084543
treed11c49516e91dbad573b83d24d1660a622c212ac
parent0abebcc0fb42bdf2b38d3856ae6437d4864ced00
[OPTIM] stream_sock: do not ask for polling on EAGAIN if we have read

It is not always wise to return 0 in stream_sock_read() upon EAGAIN,
because if we have read enough data, we should consider that enough
and try again later without polling in between.

We still make a difference between small reads and large reads though.
Small reads still lead to polling because we're sure that there's
nothing left in the system's buffers if we read less than one MSS.
src/stream_sock.c