]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: resolvers: Do not close another thread group's socket at deinit
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 29 Jul 2026 22:59:04 +0000 (00:59 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 30 Jul 2026 11:36:17 +0000 (13:36 +0200)
commitc4bccd7ff2a0599343ff1274c2439bdb5d051ba8
treee2d1e5ad1f21c7a503743089bee308678312a0f2
parent5ce5a3638255678e63a0109062f65c0bca7c6508
MEDIUM: resolvers: Do not close another thread group's socket at deinit

resolvers_destroy() runs at deinit, on the last remaining thread, and
closes the UDP nameserver sockets, which were created by the thread
their resolvers section's task was pinned to. With per-thread-group FD
tables, when that thread belongs to another group, its group's FD
table died with its last thread and already closed the socket, and the
stored number is only meaningful in that table, closing it from here
would actually close whatever FD carries the same number in this
thread's own table. So in that case, leave the FD alone.
src/resolvers.c