]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: listener/proxy: make the listeners notify about proxy pause/resume
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Sep 2020 14:03:29 +0000 (16:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
commit58651b42fc4153303a4e01d3b7fd0c195c02f3fc
treeb02a46ecd30c7f23d3e053b6b6ccad25f03ec4ea
parent5d7f9ce83123ece0245994b6c07298c872111cc9
MEDIUM: listener/proxy: make the listeners notify about proxy pause/resume

Till now, we used to call pause_proxy()/resume_proxy() to enable/disable
processing on a proxy, which is used during soft reloads. But since we want
to drive this process from the listeners themselves, we have to instead
proceed the other way around so that when we enable/disable a listener,
it checks if it changed anything for the proxy and notifies about updates
at this level.

The detection is made using li_ready=0 for pause(), and li_paused=0
for resume(). Note that we must not include any test for li_bound because
this state is seen by processes which share the listener with another one
and which must not act on it since the other process will do it. As such
the socket behind the FD will automatically be paused and resume without
its local state changing, but this is the limit of a multi-process system
with shared listeners.
src/listener.c
src/proxy.c