mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUG/MEDIUM: stconn: Check FF data of SC to perform a shutdown in sc_notify()
In sc_notify() function, the consumer side of the SC is tested to verify if we must perform a shutdown on the endpoint. To do so, no output data must be present in the buffer and in the iobuf. However, there is a bug here, the iobuf of the opposite SC is tested instead of the one of the current SC. So a shutdown can be performed on the endpoint while there are still output data in the iobuf that must be sent. Concretely, it can only be data blocked in a pipe. Because of this bug, data blocked in the pipe will be never sent. I've not tested but I guess this may block the stream during the client or server timeout. This patch must be backported as far as 2.9.
This commit is contained in:
parent
6790067e79
commit
0fcfed9e23
@ -1119,7 +1119,7 @@ void sc_notify(struct stconn *sc)
|
||||
struct task *task = sc_strm_task(sc);
|
||||
|
||||
/* process consumer side */
|
||||
if (!co_data(oc) && !sc_ep_have_ff_data(sco)) {
|
||||
if (!co_data(oc) && !sc_ep_have_ff_data(sc)) {
|
||||
struct connection *conn = sc_conn(sc);
|
||||
|
||||
if (((sc->flags & (SC_FL_SHUT_DONE|SC_FL_SHUT_WANTED)) == SC_FL_SHUT_WANTED) &&
|
||||
|
Loading…
Reference in New Issue
Block a user