BUG/MINOR: mworker: no need to stop peers for each proxy
The mworker_cleanlisteners() was cleaning the peers in the proxy loop,
which is useless since we need to stop the peers only once.
diff --git a/src/haproxy.c b/src/haproxy.c
index d40316a..6504e96 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -534,22 +534,21 @@
struct proxy *curproxy;
struct peers *curpeers;
- for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {
- /* we might have to unbind some peers sections from some processes */
- for (curpeers = cfg_peers; curpeers; curpeers = curpeers->next) {
- if (!curpeers->peers_fe)
- continue;
+ /* we might have to unbind some peers sections from some processes */
+ for (curpeers = cfg_peers; curpeers; curpeers = curpeers->next) {
+ if (!curpeers->peers_fe)
+ continue;
- stop_proxy(curpeers->peers_fe);
- /* disable this peer section so that it kills itself */
- signal_unregister_handler(curpeers->sighandler);
- task_delete(curpeers->sync_task);
- task_free(curpeers->sync_task);
- curpeers->sync_task = NULL;
- task_free(curpeers->peers_fe->task);
- curpeers->peers_fe->task = NULL;
- curpeers->peers_fe = NULL;
- }
+ stop_proxy(curpeers->peers_fe);
+ /* disable this peer section so that it kills itself */
+ signal_unregister_handler(curpeers->sighandler);
+ task_delete(curpeers->sync_task);
+ task_free(curpeers->sync_task);
+ curpeers->sync_task = NULL;
+ task_free(curpeers->peers_fe->task);
+ curpeers->peers_fe->task = NULL;
+ curpeers->peers_fe = NULL;
+ }
list_for_each_entry_safe(l, l_next, &curproxy->conf.listeners, by_fe) {
/* does not close if the FD is inherited with fd@