mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-24 06:22:44 +00:00
d6f087ea1c
Due to the way Linux delivers EPOLLIN and EPOLLHUP, a closed connection received after some server data sometimes results in truncated responses if the client disconnects before server starts to respond. The reason is that the EPOLLHUP flag is processed as an indication of end of transfer while some data may remain in the system's socket buffers. This problem could only be triggered with sepoll, although nothing should prevent it from happening with normal epoll. In fact, the work factoring performed by sepoll increases the risk that this bug appears. The fix consists in making FD_POLL_HUP and FD_POLL_ERR sticky and that they are only checked if FD_POLL_IN is not set, meaning that we have read all pending data. That way, the problem is definitely fixed and sepoll still remains about 17% faster than epoll since it can take into account all information returned by the kernel. |
||
---|---|---|
.. | ||
acl.h | ||
backend.h | ||
buffers.h | ||
capture.h | ||
client.h | ||
fd.h | ||
global.h | ||
hdr_idx.h | ||
httperr.h | ||
log.h | ||
polling.h | ||
proto_http.h | ||
protocols.h | ||
proxy.h | ||
queue.h | ||
server.h | ||
session.h | ||
task.h | ||
template.h |