MEDIUM: listener: remove the second pass of fd manipulation at the end
authorWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 18:27:02 +0000 (20:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 15 Oct 2020 19:47:56 +0000 (21:47 +0200)
commitcaa91de7184fd3f1c49204fc5a234b36e23142a2
tree877b3c86ea35755cc724dd09c2b3c41224d4d10a
parent9378bbe0bef4005155ddf56a54a27d1fcb8b93e0
MEDIUM: listener: remove the second pass of fd manipulation at the end

The receiver FDs must not be manipulated by the listener_accept()
function anymore, it must exclusively rely on the job performed by
its listeners, as it is also the only way to keep the receivers
working for established connections regardless of the listener's
state (typically for multiplexed protocols like QUIC). This used
to be necessary when the FDs were adjusted at once only but now
that fd_done() is gone and the need for polling enabled by the
accept_conn() function which detects the EAGAIN, we have nothing
to do there to fixup any possible previous bad decision anymore.

Interestingly, as a side effect of making the code not depend on
the FD anymore, it also removes the need for a second lock, which
increase the accept rate by about 1% on 8 threads.
src/listener.c