mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
MAJOR: stream-interface: fix splice not to call chk_snd by itself
In recent splice fixes we made splice call chk_snd, but this was due to inappropriate checks in conn_notify_si() which prevented the chk_snd() call from being performed. Now that this has been fixed, remove this duplicate code.
This commit is contained in:
parent
f16723e4ca
commit
2c052083e6
@ -1160,33 +1160,7 @@ void si_conn_recv_cb(struct connection *conn)
|
|||||||
goto out_error;
|
goto out_error;
|
||||||
|
|
||||||
if (conn->flags & CO_FL_WAIT_ROOM) {
|
if (conn->flags & CO_FL_WAIT_ROOM) {
|
||||||
/* We might have some data the consumer is waiting for.
|
si->flags |= SI_FL_WAIT_ROOM;
|
||||||
* We can do fast-forwarding, but we avoid doing this for partial
|
|
||||||
* buffers, because it is very likely that it will be done again
|
|
||||||
* immediately afterwards once the following data is parsed (eg:
|
|
||||||
* HTTP chunking).
|
|
||||||
*/
|
|
||||||
if (((b->flags & (BF_READ_PARTIAL|BF_OUT_EMPTY)) == BF_READ_PARTIAL) &&
|
|
||||||
(b->pipe /* always try to send spliced data */ ||
|
|
||||||
(b->buf.i == 0 && (b->cons->flags & SI_FL_WAIT_DATA)))) {
|
|
||||||
int last_len = b->pipe ? b->pipe->data : 0;
|
|
||||||
|
|
||||||
si_chk_snd(b->cons);
|
|
||||||
|
|
||||||
/* check if the consumer has freed some space */
|
|
||||||
if (!(b->flags & BF_FULL) &&
|
|
||||||
(!last_len || !b->pipe || b->pipe->data < last_len))
|
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (si->flags & SI_FL_WAIT_ROOM) {
|
|
||||||
conn_data_stop_recv(conn);
|
|
||||||
b->rex = TICK_ETERNITY;
|
|
||||||
}
|
|
||||||
else if ((b->flags & (BF_SHUTR|BF_READ_PARTIAL|BF_FULL|BF_DONT_READ|BF_READ_NOEXP)) == BF_READ_PARTIAL) {
|
|
||||||
if (tick_isset(b->rex))
|
|
||||||
b->rex = tick_add_ifset(now_ms, b->rto);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (conn->flags & CO_FL_WAIT_DATA) {
|
else if (conn->flags & CO_FL_WAIT_DATA) {
|
||||||
/* we don't automatically ask for polling if we have
|
/* we don't automatically ask for polling if we have
|
||||||
|
Loading…
Reference in New Issue
Block a user