]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sock: move the unused socket cleaning code into its own function
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 17:28:18 +0000 (18:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 28 Jan 2022 18:04:02 +0000 (19:04 +0100)
commitb510116fd2b9a676297a1d2bec7d0107bf3c7383
tree94aa8fea7161de5da0ff110374ab1ecf1819dacc
parentdd0b144c3ae83c2ea14f969cb58fa4b927c2c455
MINOR: sock: move the unused socket cleaning code into its own function

The startup code used to scan the list of unused sockets retrieved from
an older process, and to close them one by one. This also required that
the knowledge of the internal storage of these temporary sockets was
known from outside sock.c and that the code was copy-pasted at every
call place.

This patch moves this into sock.c under the name
sock_drop_unused_old_sockets(), and removes the xfer_sock_list
definition from sock.h since the rest of the code doesn't need to know
this.

This cleanup is minimal and preliminary to a future fix that will need
to be backported to all versions featuring FD transfers over the CLI.
include/haproxy/sock-t.h
include/haproxy/sock.h
src/haproxy.c
src/sock.c