BUG/MEDIUM: mworker: cleanup the listeners when reexecuting
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 18 Nov 2021 09:51:30 +0000 (10:51 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 18 Nov 2021 10:01:16 +0000 (11:01 +0100)
commitc4810b8cc8a30dd15a72cc9bcba359fc91f9b736
tree03e6c5e9c17e097c84703be72c67a794b4f37fd7
parenta22d860406cd4274fb54fce14d57ed864fb006cb
BUG/MEDIUM: mworker: cleanup the listeners when reexecuting

Previously, the cleanup of the listeners was done in mworker_loop(),
which was called once the configuration file was parsed. HAProxy was
switching in wait mode when the configuration failed to load, so no
listeners where created.

Since the latest change on the mworker mode, HAProxy switch to wait mode
after successfuly loading the configuration, without cleaning its
listeners, because it was done in mworker_loop, resulting in the master
not closing its listeners and keeping them. The master needs its
configuration to know which listeners it need to close, so that must be
done before the exec().

This patch fixes the problem by cleaning the listeners in the
mworker_reexec() function.

No backport needeed.
src/haproxy.c