mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-30 10:06:43 +00:00
MINOR: stconn: Always ack EOS at the end of sc_conn_recv()
EOS is now acknowledge at the end of sc_conn_recv(), even if an error was encountered. There is no reason to not do so, especially because, if it not performed here, it will be ack in sc_conn_process(). Note, it is still performed in sc_conn_process() because this function is also the .wake callback function and can be directly called from the lower layer.
This commit is contained in:
parent
e9bacf642d
commit
b208d8cd64
10
src/stconn.c
10
src/stconn.c
@ -1472,21 +1472,23 @@ static int sc_conn_recv(struct stconn *sc)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if (sc_ep_test(sc, SE_FL_ERROR))
|
||||
ret = 1;
|
||||
else if (sc_ep_test(sc, SE_FL_EOS)) {
|
||||
if (sc_ep_test(sc, SE_FL_EOS)) {
|
||||
/* we received a shutdown */
|
||||
if (ic->flags & CF_AUTO_CLOSE)
|
||||
channel_shutw_now(ic);
|
||||
sc_conn_read0(sc);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if (sc_ep_test(sc, SE_FL_ERROR))
|
||||
ret = 1;
|
||||
else if (!(sc->flags & (SC_FL_WONT_READ|SC_FL_NEED_BUFF|SC_FL_NEED_ROOM)) &&
|
||||
!(ic->flags & CF_SHUTR)) {
|
||||
/* Subscribe to receive events if we're blocking on I/O */
|
||||
conn->mux->subscribe(sc, SUB_RETRY_RECV, &sc->wait_event);
|
||||
se_have_no_more_data(sc->sedesc);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
se_have_more_data(sc->sedesc);
|
||||
ret = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user