]> git.kaiwu.me - 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, 14 Sep 2008 16:19:33 +0000 (18:19 +0200)
commit2859d8fb9fc42e42ce31f6e1d10dba9ea010edf6
treebc1b8be2e0e700b37c2493a0e001f771ae27fab0
parentf62c4afe63948d032f2a187e96c46176f587d393
[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