]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream-int: Notify caller when an error is reported after a rcv_pipe()
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 19 Nov 2018 21:02:07 +0000 (22:02 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Nov 2018 13:31:44 +0000 (14:31 +0100)
In si_cs_send(), when an error is found on the CS or the connection at the
beginning of the function, we return 1 to notify the caller some processing may
be triggered. So, it seems logical to do the same after the call to rcv_pipe().

This patch is not flagged as a bug because no strange behaviour was yet observed
without it. It is just a proactive fix to be consistent.

src/stream_interface.c

index 1f82959523db64f22ec8b3601e6df563e4c5cf79..cf3f9d2ef82e2ef5c89996ccb669a2ab477afb48 100644 (file)
@@ -625,7 +625,7 @@ int si_cs_send(struct conn_stream *cs)
                }
 
                if (conn->flags & CO_FL_ERROR || cs->flags & CS_FL_ERROR)
-                       return 0;
+                       return 1;
        }
 
        /* At this point, the pipe is empty, but we may still have data pending