MINOR: spoe: Don't systematically create new applets if processing rate is low
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 22 Jun 2020 13:32:14 +0000 (15:32 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Jul 2020 17:03:55 +0000 (19:03 +0200)
commit1665e4a2d47b11da221491653606ed5025a3012d
tree920b558e182154b4811da29cab8beaf638879953
parent148e7c41fcdc5bc4fde65a5a39a6f41d3c48f545
MINOR: spoe: Don't systematically create new applets if processing rate is low

When an event must be processed, we decide to create a new SPOE applet if there
is no idle applet at all or if the processing rate is lower than the number of
waiting events. But when the processing rate is very low (< 1 event/second), a
new applet is created independently of the number of idle applets.

Now, when there is at least one idle applet when there is only one event to
process, no new applet is created.

This patch is related to the issue #690.

(cherry picked from commit eccfa612e8c9fd566f94dea9b0213b8b0d2d0531)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/flt_spoe.c