]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] dynamic connection throttling could return a max of zero conns
authorWilly Tarreau <w@1wt.eu>
Sun, 14 Sep 2008 15:43:27 +0000 (17:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 7 Dec 2008 22:30:38 +0000 (23:30 +0100)
commit28a9e529f8ec5b78f7047c8b94c5684fb594ba5b
tree7f9063bfe0a427cf76bb7eb266c6f8cb12b4e62c
parent43662ff35d8b172edf8237aa277985ab1bbbcacf
[BUG] dynamic connection throttling could return a max of zero conns

srv_dynamic_maxconn() is clearly documented as returning at least 1
possible connection under throttling. But the computation was wrong,
the minimum 1 was divided and got lost in case of very low maxconns.

Apply the MAX(1, max) before returning the result in order to ensure
that a newly appeared server will get some traffic.
(cherry picked from commit 819970098f134453c0934047b3bd3440b0996b55)
src/queue.c