]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: proxy: remove stop_time related dead code
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 28 Mar 2023 13:45:53 +0000 (15:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Mar 2023 18:26:47 +0000 (20:26 +0200)
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.

include/haproxy/proxy-t.h
src/proxy.c

index 50c84889d4e0c5ce674bb3ef81447af3b87e50bb..cee87f5a0322a0c68778f278538405976d097380 100644 (file)
@@ -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 */
index b44d537198cb96c0ba7e6154740a436d0e44d62c..1e4e36c93b9ebba82382a844504c0007dc1c831d 100644 (file)
@@ -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