]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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)
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

index 194bd064ec6cfe97c54581bb1151ef1d61d83d1d..57002c0984502aa3d806bef8618cd72f9ec3cb7d 100644 (file)
@@ -472,7 +472,6 @@ static void sink_forward_oc_io_handler(struct appctx *appctx)
 
 close:
        se_fl_set(appctx->sedesc, SE_FL_EOS|SE_FL_EOI);
-       goto out;
 }
 
 void __sink_forward_session_deinit(struct sink_forward_target *sft)