]> 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 15:43:27 +0000 (17:43 +0200)
commit819970098f134453c0934047b3bd3440b0996b55
treee23eb85ee46f42955819522b5da6876e08ce0996
parent8262d8bd7fdb262c980bd70cb2931e51df07513f
[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.
src/queue.c