From: Arran Cudbard-Bell Date: Fri, 6 Dec 2019 11:45:05 +0000 (+0700) Subject: Recalculate requests per connection when a request enters the backlog X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74cc3ef2f65ee71d33cbf7312ec3da0cc835ae28;p=thirdparty%2Ffreeradius-server.git Recalculate requests per connection when a request enters the backlog --- diff --git a/src/lib/server/trunk.c b/src/lib/server/trunk.c index 2449a3d89eb..8a100c723d0 100644 --- a/src/lib/server/trunk.c +++ b/src/lib/server/trunk.c @@ -712,6 +712,13 @@ static void trunk_request_enter_backlog(fr_trunk_request_t *treq) REQUEST_STATE_TRANSITION(FR_TRUNK_REQUEST_BACKLOG); fr_heap_insert(trunk->backlog, treq); /* Insert into the backlog heap */ + /* + * New requests in the backlog alters the + * ratio of requests to connections, so we + * need to recalculate. + */ + trunk_requests_per_connnection(NULL, NULL, trunk, fr_time()); + /* * To reduce latency, if there's no connections * in the connecting state, call the trunk manage