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.
This commit is contained in:
Aurelien DARRAGON 2023-03-28 15:45:53 +02:00 committed by Willy Tarreau
parent 6e1fe253b7
commit 2c5b9ded9b
2 changed files with 0 additions and 15 deletions

View File

@ -379,7 +379,6 @@ struct proxy {
struct ist header_unique_id; /* unique-id header */ struct ist header_unique_id; /* unique-id header */
struct list format_unique_id; /* unique-id format */ struct list format_unique_id; /* unique-id format */
int to_log; /* things to be logged (LW_*) */ 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 */ 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 *req_cap; /* chained list of request headers to be captured */
struct cap_hdr *rsp_cap; /* chained list of response headers to be captured */ struct cap_hdr *rsp_cap; /* chained list of response headers to be captured */

View File

@ -1988,20 +1988,6 @@ struct task *manage_proxy(struct task *t, void *context, unsigned int state)
* global resource here. * 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 /* 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 * 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 * and all the ones in the pool used to allocate new entries. Any