When abortonclose option is enabled on the backend, at the SC level, we must
still pretend the SE have more data to deliver to be able to receive the
EOS. It must be performed at 2 places:
* When the backend is set and the connection is requested. It is when the
option is seen for the first time.
* After a receive attempt, if the EOI flag is set on the sedesc.
Otherwise, when an abort is detected by the mux, the SC is not
notified.
This patch should fix the issue #2764.
This bug probably exists in all stable version but is only visible since
bca5e1423 ("OPTIM: stconn: Don't pretend mux have more data to deliver on
EOI/EOS/ERROR"). So I suggest to not backport it for now, except if the commit
above is backported.
se_have_no_more_data(sc->sedesc);
}
else if (sc->flags & SC_FL_EOI) {
- /* No more data are expected at this stage */
- se_have_no_more_data(sc->sedesc);
+ /* No more data are expected at this stage, except if abortonclose is enabled */
+ if (!(flags & CO_RFL_KEEP_RECV))
+ se_have_no_more_data(sc->sedesc);
+ else
+ se_have_more_data(sc->sedesc);
}
else {
/* The mux may have more data to deliver. Be sure to be able to
if (s->be->options & PR_O_ABRT_CLOSE) {
struct connection *conn = sc_conn(scf);
+ se_have_more_data(scf->sedesc);
if (conn && conn->mux && conn->mux->ctl)
conn->mux->ctl(conn, MUX_CTL_SUBS_RECV, NULL);
}