diff --git a/src/queue.c b/src/queue.c index 33f9867b8..c8b27b4fa 100644 --- a/src/queue.c +++ b/src/queue.c @@ -55,8 +55,8 @@ unsigned int srv_dynamic_maxconn(const struct server *s) now.tv_sec < s->last_change + s->slowstart && now.tv_sec >= s->last_change) { unsigned int ratio; - ratio = MAX(1, 100 * (now.tv_sec - s->last_change) / s->slowstart); - max = max * ratio / 100; + ratio = 100 * (now.tv_sec - s->last_change) / s->slowstart; + max = MAX(1, max * ratio / 100); } return max; }