From: Aurelien DARRAGON Date: Tue, 28 Mar 2023 13:45:53 +0000 (+0200) Subject: CLEANUP: proxy: remove stop_time related dead code X-Git-Tag: v2.8-dev7~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c5b9ded9be9e006a24ac3acf303006ccad7baef;p=thirdparty%2Fhaproxy.git CLEANUP: proxy: remove stop_time related dead code Since eb77824 ("MEDIUM: proxy: remove the deprecated "grace" keyword"), stop_time is never set, so the related code in manage_proxy() is not relevant anymore. Removing code that refers to p->stop_time, since it was probably overlooked. --- diff --git a/include/haproxy/proxy-t.h b/include/haproxy/proxy-t.h index 50c84889d4..cee87f5a03 100644 --- a/include/haproxy/proxy-t.h +++ b/include/haproxy/proxy-t.h @@ -379,7 +379,6 @@ struct proxy { struct ist header_unique_id; /* unique-id header */ struct list format_unique_id; /* unique-id format */ int to_log; /* things to be logged (LW_*) */ - int stop_time; /* date to stop listening, when stopping != 0 (int ticks) */ int nb_req_cap, nb_rsp_cap; /* # of headers to be captured */ struct cap_hdr *req_cap; /* chained list of request headers to be captured */ struct cap_hdr *rsp_cap; /* chained list of response headers to be captured */ diff --git a/src/proxy.c b/src/proxy.c index b44d537198..1e4e36c93b 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1988,20 +1988,6 @@ struct task *manage_proxy(struct task *t, void *context, unsigned int state) * global resource here. */ - /* first, let's check if we need to stop the proxy */ - if (unlikely(stopping && !(p->flags & (PR_FL_DISABLED|PR_FL_STOPPED)))) { - int t; - t = tick_remain(now_ms, p->stop_time); - if (t == 0) { - stop_proxy(p); - /* try to free more memory */ - pool_gc(NULL); - } - else { - next = tick_first(next, p->stop_time); - } - } - /* If the proxy holds a stick table, we need to purge all unused * entries. These are all the ones in the table with ref_cnt == 0 * and all the ones in the pool used to allocate new entries. Any