MINOR: protocol: introduce protocol_{pause,resume}_all()
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Sep 2020 14:26:50 +0000 (16:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 09:27:30 +0000 (11:27 +0200)
commit09819d11180f88a803b54297edbb68d5fe5b5173
treee2cd6684e6fbb4de641aaa0509d9f3153299ea22
parent58651b42fc4153303a4e01d3b7fd0c195c02f3fc
MINOR: protocol: introduce protocol_{pause,resume}_all()

These two functions are used to pause and resume all listeners of
all protocols. They use the standard listener functions for this
so they're supposed to handle the situation gracefully regardless
of the upper proxies' states, and they will report completion on
proxies once the switch is performed.

It might be nice to define a particular "failed" state for listeners
that cannot resume and to count them on proxies in order to mention
that they're definitely stuck. On the other hand, the current
situation is retryable which is quite appreciable as well.
include/haproxy/protocol.h
src/protocol.c