mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: proxy: define proxy watcher member
Define a new member watcher_list in proxy. It will be used to register modules which iterate over the proxies list. This will ensure that the operation is safe even if a backend is removed in parallel.
This commit is contained in:
parent
08623228a1
commit
4bcfc09acf
2 changed files with 2 additions and 0 deletions
|
|
@ -507,6 +507,7 @@ struct proxy {
|
|||
struct list filter_configs; /* list of the filters that are declared on this proxy */
|
||||
|
||||
struct guid_node guid; /* GUID global tree node */
|
||||
struct mt_list watcher_list; /* list of elems which currently references this proxy instance (currently only used with backends) */
|
||||
|
||||
EXTRA_COUNTERS(extra_counters_fe);
|
||||
EXTRA_COUNTERS(extra_counters_be);
|
||||
|
|
|
|||
|
|
@ -1580,6 +1580,7 @@ void init_new_proxy(struct proxy *p)
|
|||
|
||||
p->stream_new_from_sc = stream_new;
|
||||
guid_init(&p->guid);
|
||||
MT_LIST_INIT(&p->watcher_list);
|
||||
|
||||
p->extra_counters_fe = NULL;
|
||||
p->extra_counters_be = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue