From: Willy Tarreau Date: Wed, 5 Dec 2018 12:45:41 +0000 (+0100) Subject: BUG/MEDIUM: stream-int: don't mark as blocked an empty buffer on Rx X-Git-Tag: v1.9-dev10~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=674e0addc4426cb5b42088d84975c65a2e00c547;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream-int: don't mark as blocked an empty buffer on Rx After 8706c8131 ("BUG/MEDIUM: mux_pt: Always set CS_FL_RCV_MORE."), a side effect caused failed receives to mark the buffer as missing room, a flag that no other place can remove since it's empty. Ideally we need a separate flag to mean "failed to deliver data by lack of room", but in the mean time at the very least we must not mark as blocked an empty buffer. No backport is needed. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 3a5a39f23c..73d9d4f8e0 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1214,7 +1214,8 @@ int si_cs_recv(struct conn_stream *cs) flags | (co_data(ic) ? CO_RFL_BUF_WET : 0) | ((channel_recv_limit(ic) < b_size(&ic->buf)) ? CO_RFL_KEEP_RSV : 0)); - if (cs->flags & CS_FL_RCV_MORE) + + if (b_data(&ic->buf) && (cs->flags & CS_FL_RCV_MORE)) si_rx_room_blk(si); if (cs->flags & CS_FL_READ_PARTIAL) {