[MAJOR] proxy: finally get rid of maintain_proxies()
This function is finally not needed anymore, as it has been replaced with
a per-proxy task that is scheduled when some limits are encountered on
incoming connections or when the process is stopping. The savings should
be noticeable on configs with a large number of proxies. The most important
point is that the rate limiting is now enforced in a clean and solid way.
diff --git a/src/haproxy.c b/src/haproxy.c
index c3841dd..26fd021 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -918,6 +918,7 @@
free(p->fwdfor_hdr_name);
free_http_req_rules(&p->http_req_rules);
+ free(p->task);
pool_destroy2(p->req_cap_pool);
pool_destroy2(p->rsp_cap_pool);
@@ -992,13 +993,7 @@
return ret;
}
-/*
- * Runs the polling loop
- *
- * FIXME:
- * - we still use 'listeners' to check whether we want to stop or not.
- *
- */
+/* Runs the polling loop */
void run_poll_loop()
{
int next;
@@ -1014,11 +1009,6 @@
/* Process a few tasks */
process_runnable_tasks(&next);
- /* maintain all proxies in a consistent state. This should quickly
- * become a task because it becomes expensive when there are huge
- * numbers of proxies. */
- maintain_proxies(&next);
-
/* stop when there's nothing left to do */
if (jobs == 0)
break;