summaryrefslogtreecommitdiffstats
path: root/src/stconn.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
commitddfc40eabdbc59a607b568e946fb116dcd3439fd (patch)
treeb3253de65399448dbbf12e5b65d2da56c53d3af6 /src/stconn.c
parentAdding upstream version 2.9.6. (diff)
downloadhaproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.tar.xz
haproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.zip
Adding upstream version 2.9.7.upstream/2.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/stconn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stconn.c b/src/stconn.c
index 8e3ae7e..df119a1 100644
--- a/src/stconn.c
+++ b/src/stconn.c
@@ -526,7 +526,7 @@ static inline int sc_cond_forward_shut(struct stconn *sc)
if (!(sc->flags & (SC_FL_EOS|SC_FL_ABRT_DONE)) || !(sc->flags & SC_FL_NOHALF))
return 0;
- if (co_data(sc_ic(sc)) && !(sc_ic(sc)->flags & CF_WRITE_TIMEOUT)) {
+ if ((co_data(sc_ic(sc)) || sc_ep_have_ff_data(sc_opposite(sc))) && !(sc_ic(sc)->flags & CF_WRITE_TIMEOUT)) {
/* the shutdown cannot be forwarded now because
* we should flush outgoing data first. But instruct the output
* channel it should be done ASAP.
@@ -1060,7 +1060,7 @@ void sc_notify(struct stconn *sc)
struct task *task = sc_strm_task(sc);
/* process consumer side */
- if (!co_data(oc)) {
+ if (!co_data(oc) && !sc_ep_have_ff_data(sco)) {
struct connection *conn = sc_conn(sc);
if (((sc->flags & (SC_FL_SHUT_DONE|SC_FL_SHUT_WANTED)) == SC_FL_SHUT_WANTED) &&