mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MINOR: filters: Skip disabled proxies during startup only
This partially reverts the patch 400829cd2 ("BUG/MEDIUM: filters: Don't try to init filters for disabled proxies"). Disabled proxies must not be skipped in flt_deinit() and flt_deinit_all_per_thread() when HAProxy is stopped because, obvioulsy, at this step, all proxies appear as disabled (or stopped, it is the same state). It is safe to do so because, during startup, filters declared on disabled proxies are removed. Thus they don't exist anymore during shutdown. This patch must be backported in all versions where the patch above is.
This commit is contained in:
parent
9dd7f4fb4b
commit
743bd6adc8
@ -356,7 +356,7 @@ flt_deinit(struct proxy *proxy)
|
||||
struct flt_conf *fconf, *back;
|
||||
|
||||
list_for_each_entry_safe(fconf, back, &proxy->filter_configs, list) {
|
||||
if (!proxy->disabled && fconf->ops->deinit)
|
||||
if (fconf->ops->deinit)
|
||||
fconf->ops->deinit(proxy, fconf);
|
||||
LIST_DEL(&fconf->list);
|
||||
free(fconf);
|
||||
@ -385,11 +385,9 @@ flt_deinit_all_per_thread()
|
||||
{
|
||||
struct proxy *px;
|
||||
|
||||
for (px = proxies_list; px; px = px->next) {
|
||||
if (!px->disabled)
|
||||
for (px = proxies_list; px; px = px->next)
|
||||
flt_deinit_per_thread(px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Attaches a filter to a stream. Returns -1 if an error occurs, 0 otherwise. */
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user