[MEDIUM] session: account per-listener connections
In order to merge the unix session handling code, we have to maintain
the number of per-listener connections in the session. This was only
performed for unix sockets till now.
diff --git a/src/session.c b/src/session.c
index 5213dcd..1a18790 100644
--- a/src/session.c
+++ b/src/session.c
@@ -1206,6 +1206,13 @@
if (s->flags & SN_BE_ASSIGNED)
s->be->beconn--;
actconn--;
+ s->listener->nbconn--;
+ if (s->listener->state == LI_FULL &&
+ s->listener->nbconn < s->listener->maxconn) {
+ /* we should reactivate the listener */
+ EV_FD_SET(s->listener->fd, DIR_RD);
+ s->listener->state = LI_READY;
+ }
if (unlikely((global.mode & MODE_DEBUG) &&
(!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {