MEDIUM: proxy: centralize proxy status update and reporting
authorWilly Tarreau <w@1wt.eu>
Wed, 7 Oct 2020 14:31:39 +0000 (16:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 16:29:04 +0000 (18:29 +0200)
commitacde15217550f6db198b0119e743222b40ce5245
tree6fd21adc38fdbfc6a5db3bffb52d1a8b23a015c2
parenta389c9e1e39cbdb88eb06206fb1daf39798ac5d5
MEDIUM: proxy: centralize proxy status update and reporting

There are multiple ways a proxy may switch to the disabled state,
but now it's essentially once it loses its last listener. Instead
of keeping duplicate code around and reporting the state change
before actually seeing it, we now report it at the moment it's
performed (from the last listener leaving) which allows to remove
the message from all other places.
include/haproxy/proxy.h
src/listener.c
src/proxy.c