From: Aurelien DARRAGON Date: Tue, 23 Jul 2024 17:02:29 +0000 (+0200) Subject: MINOR: sink: Remove useless test on SE_FL_SHR/SHW flags X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=0549eb167a80ea6a95c829f0239361bc6245fc2f;p=haproxy-3.0.git MINOR: sink: Remove useless test on SE_FL_SHR/SHW flags Re-apply dcd917d972 ("MINOR: applet: Remove uselelss test on SE_FL_SHR/SHW flags") for sink_forward_oc_io_handler() function as it was probably overlooked given that sink_forward_oc_io_handler() and sink_forward_io_handler() follow the same logic. (cherry picked from commit f2848e6146faa0794a9878610602d03608af07df) [ada: required to fix applet not destroyed upon server disconnect, see GH #3153, the test turned out to be mandatory, not useless] Signed-off-by: Aurelien DARRAGON --- diff --git a/src/sink.c b/src/sink.c index be942ad..ba2bdb9 100644 --- a/src/sink.c +++ b/src/sink.c @@ -426,7 +426,7 @@ static void sink_forward_oc_io_handler(struct appctx *appctx) size_t ofs, last_ofs; int ret = 0; - if (unlikely(se_fl_test(appctx->sedesc, (SE_FL_EOS|SE_FL_ERROR|SE_FL_SHR|SE_FL_SHW)))) + if (unlikely(se_fl_test(appctx->sedesc, (SE_FL_EOS|SE_FL_ERROR)))) goto out; /* if stopping was requested, close immediately */