BUG/MINOR: mworker: deinit of thread poller was called when not initialized
authorWilliam Lallemand <wlallemand@haproxy.org>
Fri, 26 Nov 2021 13:43:57 +0000 (14:43 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 2 Dec 2021 14:11:47 +0000 (15:11 +0100)
commite925c61a0e5bbc49368bc32b69d01d9e0305189a
tree42196b2ea9df75e29b8f96f59f68377c60a97a29
parent440ee1a64a160891189879171c36bce5bea932d3
BUG/MINOR: mworker: deinit of thread poller was called when not initialized

Commit 67e371e ("BUG/MEDIUM: mworker: FD leak of the eventpoll in wait
mode") introduced a regression. Upon a reload it tries to deinit the
poller per thread, but no poll loop was initialized after loading the
configuration.

This patch fixes the issue by moving this part of the code in
mworker_reload(), since this function will be called only when the
poller is fully initialized.

This patch must be backported in 2.5.

(cherry picked from commit efd954793e60131932c61883d0869c7912a5d12c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/haproxy.c