From: Arran Cudbard-Bell Date: Fri, 6 Dec 2019 23:29:59 +0000 (+0700) Subject: Start off assuming we're probably above our target number of connections X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaa7587f86f80c673a952628c8e1a3615c459a09;p=thirdparty%2Ffreeradius-server.git Start off assuming we're probably above our target number of connections --- diff --git a/src/lib/server/trunk.c b/src/lib/server/trunk.c index 8e0728c49c6..8f7232241e0 100644 --- a/src/lib/server/trunk.c +++ b/src/lib/server/trunk.c @@ -2562,7 +2562,7 @@ static void trunk_manage(fr_trunk_t *trunk, fr_time_t now) * We're above the target requests per connection * spawn more connections! */ - if ((trunk->last_above_target > trunk->last_below_target)) { + if ((trunk->last_above_target >= trunk->last_below_target)) { if ((now - trunk->last_above_target) < trunk->conf->open_delay) { DEBUG4("Not opening connection - Need %pVs above threshold, have %pVs", fr_box_time_delta(trunk->conf->open_delay), @@ -2576,7 +2576,7 @@ static void trunk_manage(fr_trunk_t *trunk, fr_time_t now) * that a call to trunk_requests_per_connnection * was missed. */ - rad_assert(trunk->last_above_target > trunk->last_below_target); + rad_assert(trunk->last_above_target >= trunk->last_below_target); /* * We don't consider 'draining' connections