BUG/MEDIUM: mux-h1: Handle connection error after a synchronous send

Since commit d1480cc8 ("BUG/MEDIUM: stream-int: do not rely on the
connection error once established"), connection errors are not handled
anymore by the stream-connector once established. But it is a problem for
the H1 mux when an error occurred during a synchronous send in
h1_snd_buf(). Because in this case, the connction error is just missed. It
leads to a session leak until a timeout is reached (client or server).

To fix the bug, the connection flags are now checked in h1_snd_buf(). If
there is an error, it is reported to the stconn level by setting SF_FL_ERROR
flags. But only if there is no pending data in the input buffer.

This patch should solve the issue #1774. It must be backported as far as
2.2.

(cherry picked from commit 372b38f9351b31bd107452d5f3598fc58be32e8a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit db43010160392675ec0a9fb27e89b1dce88bcd41)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1c31d630915abe094eb0f5f0b02db4bcb0bdcdba)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed