enum {
CO_SFL_MSG_MORE = 0x0001, /* More data to come afterwards */
CO_SFL_STREAMER = 0x0002, /* Producer is continuously streaming data */
+ CO_SFL_LAST_DATA = 0x0003, /* Sent data are the last ones, shutdown is pending */
};
/* mux->shutr() modes */
}
}
+ if ((sc->flags & SC_FL_SHUT_WANTED) && co_data(oc) == c_data(oc))
+ send_flag |= CO_SFL_LAST_DATA;
+
ret = conn->mux->snd_buf(sc, &oc->buf, co_data(oc), send_flag);
if (ret > 0) {
did_send = 1;
BUG_ON(sc_ep_have_ff_data(sc));
if (co_data(oc)) {
- ret = appctx_snd_buf(sc, &oc->buf, co_data(oc), 0);
+ unsigned int send_flag = 0;
+
+ if ((sc->flags & SC_FL_SHUT_WANTED) && co_data(oc) == c_data(oc))
+ send_flag |= CO_SFL_LAST_DATA;
+
+ ret = appctx_snd_buf(sc, &oc->buf, co_data(oc), send_flag);
if (ret > 0) {
did_send = 1;
c_rew(oc, ret);