BUG/MINOR: stream: don't close the front connection when facing a backend error
authorWilly Tarreau <w@1wt.eu>
Thu, 31 Jan 2019 17:58:06 +0000 (18:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 31 Jan 2019 18:38:25 +0000 (19:38 +0100)
commit28e581b21c8229aa50b7e45148dd46fa6f43da5e
tree5b1f3167a2cda5f8a6d56b385934f5e0a77dc412
parent8788b4111c78be8397155949f245e6b34caa6acd
BUG/MINOR: stream: don't close the front connection when facing a backend error

In 1.5-dev13, a bug was introduced by commit e3224e870 ("BUG/MINOR:
session: ensure that we don't retry connection if some data were sent").
If a connection error is reported after some data were sent (and lost),
we used to accidently mark the front connection as being in error instead
of only the back one because the two direction flags were applied to the
same channel. This case is extremely rare with raw connections but can
happen a bit more often with multiplexed streams. This will result in
the error not being correctly reported to the client.

This patch can be backported to all supported versions.
src/stream.c