BUG/MEDIUM: flt-spoe: Properly handle end of stream from the SPOE applet
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 4 Feb 2025 17:05:33 +0000 (18:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 10:43:06 +0000 (11:43 +0100)
commit07fc7047b5de9e91b4c991c7baf3bb8a20c307c8
tree3cc29d9efabf20e1d517aa08b24ea83a8ceb6e77
parent7b8e934ab158b10ed02d5739ae96615b227a3cc7
BUG/MEDIUM: flt-spoe: Properly handle end of stream from the SPOE applet

The previous fix ("BUG/MEDIUM: applet: Don't pretend to have more data to
handle EOI/EOS/ERROR") revealed an issue with the way the SPOE applet was
reporting the end of stream, leading to never shut the applet down.

In fact, there is two bug in one. The first one is about the applet
shutdown. Since the fix above, the applet is no longer closed. Before, it
was closed because it was reported in error. But now, it is just delayed
because the applet and the SPOP stream are declared to support half close
connections. So the applet is only closed when the SPOP connection is
closed. To fix this bug, both side are now stating that half close
connections are not supported.

The second bug is about the way the end of stream is reported. It is
reported when the ACK response is received. But it is too early, because the
parent stream must process the response first. So now, we take care to have
processed the ACK from the parent applet before reporting an end of stream.

This patch must be backported with the commit above to 3.1.

(cherry picked from commit 38aac2c7bcfcce040eabd5e6df9b5c2f783a821a)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/flt_spoe.c