From 901a66b3fc519537071784525cf54d9049098817 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Tue, 23 Jul 2024 18:57:35 +0200 Subject: [PATCH] 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sink.c b/src/sink.c index 194bd064e..57002c098 100644 --- a/src/sink.c +++ b/src/sink.c @@ -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)