]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Start off assuming we're probably above our target number of connections
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 6 Dec 2019 23:29:59 +0000 (06:29 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 7 Dec 2019 05:36:36 +0000 (12:36 +0700)
src/lib/server/trunk.c

index 8e0728c49c65ee79886c7df6006712984b38297c..8f7232241e085dea4b659c3a21a83d39c52aa51e 100644 (file)
@@ -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