for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {
list_for_each_entry_safe(l, l_next, &curproxy->conf.listeners, by_fe) {
- /* does not close if the FD is inherited with fd@
- * from the parent process */
- if (!(l->options & (LI_O_INHERITED|LI_O_MWORKER)))
- unbind_listener(l);
/* remove the listener, but not those we need in the master... */
- if (!(l->options & LI_O_MWORKER))
+ if (!(l->options & LI_O_MWORKER)) {
+ /* unbind the listener but does not close if
+ the FD is inherited with fd@ from the parent
+ process */
+ if (l->options & LI_O_INHERITED)
+ unbind_listener_no_close(l);
+ else
+ unbind_listener(l);
delete_listener(l);
+ }
}
}
}