]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sock: check configured limits at the sock layer, not the listener's
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 13:01:37 +0000 (15:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 17:31:47 +0000 (19:31 +0200)
commite4d09cedb60a3bc8ad92f9cb7d4448fb955a73ed
tree2e97b9a97583a55a5f26c5592028f0b869e8e35d
parent6ea6ed74188f2438707536548aaf8a35a96b484c
MINOR: sock: check configured limits at the sock layer, not the listener's

listener_accept() used to continue to enforce the FD limits relative to
global.maxsock by itself while it's the last FD-specific test in the
whole file. This test has nothing to do there, it ought to be placed in
sock_accept_conn() which is the one in charge of FD allocation and tests.
Similar tests are already located there by the way. The only tiny
difference is that listener_accept() used to pause for one second when
this limit was reached, while other similar conditions were pausing only
100ms, so now the same 100ms will apply. But that's not important and
could even be considered as an improvement.
src/listener.c
src/sock.c