]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: listener: let do_unbind_listener() decide whether to close or not
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 13:47:17 +0000 (15:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2020 16:41:48 +0000 (18:41 +0200)
commit374e9af35840c0d6294036e0b6c82c3229dc255a
treed744fe141adda54b4a5f4a37fd0173520f9ee700
parent87acd4e84815b6d7116ca28f45c8545eb7026169
MEDIUM: listener: let do_unbind_listener() decide whether to close or not

The listener contains all the information needed to decide to close on
unbind or not. The rule is the following (when we're not stopping):

  - worker process unbinding from a worker's FD with socket transfer enabled => keep
  - master process unbinding from a master's inherited FD => keep
  - master process unbinding from a master's FD => close
  - master process unbinding from a worker's FD => close
  - worker process unbinding from a master's FD => close
  - worker process unbinding from a worker's FD => close

Let's translate that into the function and stop using the do_close
argument that is a bit obscure for callers. It was not yet removed
to ease code testing.
src/listener.c