MINOR: frontend: implement a dedicated actconn increment function
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Oct 2023 13:32:28 +0000 (15:32 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Oct 2023 13:18:48 +0000 (15:18 +0200)
commitfffd435bbd6f83f79bc5326d007365711ae0252d
tree8273dd46df193525883d66ecfc6c40b4aae1f20a
parentfe29dba872fb91de4bc0bf7ea0f68b599148348f
MINOR: frontend: implement a dedicated actconn increment function

When a new frontend connection is instantiated, actconn global counter
is incremented. If global maxconn value is reached, the connection is
cancelled. This ensures that system limit are under control.

Prior to this patch, the atomic check/increment operations were done
directly into listener_accept(). Move them in a dedicated function
increment_actconn() in frontend module. This will be useful when QUIC
connections will be counted in actconn counter.
include/haproxy/frontend.h
src/frontend.c
src/listener.c