mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-10 09:21:35 -04:00
BUG/MEDIUM: stconn: Don't perform zero-copy FF if opposite SC is blocked
When zero-copy data fast-forwarding is inuse, if the opposite SC is blocked, there is no reason to try to fast-forward more data. Worst, in some cases, this can lead to a receive loop of the producer side while the consumer side is blocked. No backport needed.
This commit is contained in:
parent
fe3726cb76
commit
2a307d273a
1 changed files with 3 additions and 0 deletions
|
|
@ -281,6 +281,9 @@ static inline int sc_is_recv_allowed(const struct stconn *sc)
|
|||
if (sc_ep_test(sc, SE_FL_HAVE_NO_DATA))
|
||||
return 0;
|
||||
|
||||
if (sc_ep_test(sc, SE_FL_MAY_FASTFWD) && (sc_opposite(sc)->sedesc->iobuf.flags & IOBUF_FL_FF_BLOCKED))
|
||||
return 0;
|
||||
|
||||
return !(sc->flags & (SC_FL_WONT_READ|SC_FL_NEED_BUFF|SC_FL_NEED_ROOM));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue