]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stream-int: Don't call snd_buf() if there are still data in the pipe
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 09:21:08 +0000 (10:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 13:31:44 +0000 (14:31 +0100)
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.

src/stream_interface.c

index 017d1ef3176b1c3bce39b74da3ccbada30b87777..ca138cbef02f294a29631941f2e9f5f61d54b8aa 100644 (file)
@@ -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