]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sink: unify and sink_forward_io_handler() and sink_forward_oc_io_handler()
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 23 Jul 2024 16:57:35 +0000 (18:57 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 24 Jul 2024 15:58:30 +0000 (17:58 +0200)
commit901a66b3fc519537071784525cf54d9049098817
tree0d6e9faa2c91733f69b97b632f505bf74a22e5ad
parentc81b8ee480f7e55809b56b369cfea1bf36879e67
MINOR: sink: unify and sink_forward_io_handler() and sink_forward_oc_io_handler()

In a739dc2 ("MEDIUM: sink: Use the sedesc to report and detect end of
processing"), we added a drain after close in sink_forward_oc_io_handler()
by the use of "goto out".

However, since we perform a close, there is no reason to drain data from
the socket. Moreover, before the patch there was no drain and nothing
mentioned the fact that that the drain was added on purpose. Lastly,
sink_forward_io_handler() and sink_forward_oc_io_handler() functions are
strictly identical when in comes to processing logic, and the drain was
only added in sink_forward_oc_io_handler() and not in
sink_forward_io_handler().

As such, it's pretty safe to assume that the drain is not needed here
and was added as accident. So in this patch we remove it in an attempt
to unify sink_forward_io_handler() and sink_forward_oc_io_handler()
functions like it was already the case before.
src/sink.c