From: Christopher Faulet Date: Tue, 20 Nov 2018 09:21:08 +0000 (+0100) Subject: BUG/MINOR: stream-int: Don't call snd_buf() if there are still data in the pipe X-Git-Tag: v1.9-dev8~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f76f4ccf7532625bb272e961cb87e64efaf8ed4;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream-int: Don't call snd_buf() if there are still data in the pipe In si_cs_send, as said in comments, snd_buf() should only be called if there is no data in the pipe anymore. But actually, this condition was not respected. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 017d1ef317..ca138cbef0 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -626,6 +626,9 @@ int si_cs_send(struct conn_stream *cs) if (conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR) return 1; + + if (oc->pipe) + goto end; } /* At this point, the pipe is empty, but we may still have data pending