]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: sink: initialize the settings of the implicit log server
authorWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 13:26:35 +0000 (15:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 13:56:09 +0000 (15:56 +0200)
commitecc54e2a2019fcd3199286e144ced956e5c7cefe
treebdb68aede7ed1adaf4cd4c1fd1f60ed127b4835f
parent30890fd90e036fa12741320e5205477097f3e333
BUG/MEDIUM: sink: initialize the settings of the implicit log server

TCP logs currently work fairly badly due to connections closing
immediately after logs are sent (or at best a full buffer of logs).
This started to happen in 3.1 with commit 237849c911 ("MEDIUM: sink:
"max-reuse" support for sink servers") thow that commit is not faulty,
the issue stems to the complex server creation chain.

What happens is that max_reuse >= 0 means the max-reuse setting is
enable, and the sink server creation in sink_new_from_logger() creates
a server but doesn't initialize it. Other servers are not exactly
initialized, they're preset from defaults which are initialized. But
here we don't inherit defaults so we must call srv_settings_init(),
otherwise max_reuse remains zero and connections are closed after each
message.

This must be backported to 3.2.
src/sink.c