]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: channel: Remove flags to report READ or WRITE errors
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 26 Jan 2023 15:18:09 +0000 (16:18 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Feb 2023 13:52:15 +0000 (14:52 +0100)
commit2e56a73459b1c9e9783619c18478ba5cb4ab5843
treec7be5a51a3eb447691b5b3a57c543f9ca11bb233
parent81fdeb8ce2cb10bfe2119dbb4c63f080bb5f8be4
MAJOR: channel: Remove flags to report READ or WRITE errors

This patch removes CF_READ_ERROR and CF_WRITE_ERROR flags. We now rely on
SE_FL_ERR_PENDING and SE_FL_ERROR flags. SE_FL_ERR_PENDING is used for write
errors and SE_FL_ERROR for read or unrecoverable errors.

When a connection error is reported, SE_FL_ERROR and SE_FL_EOS are now set and a
read event and a write event are reported to be sure the stream will properly
process the error. At the stream-connector level, it is similar. When an error
is reported during a send, a write event is triggered. On the read side, nothing
more is performed because an error at this stage is enough to wake the stream
up.

A major change is brought with this patch. We stop to check flags of the
ooposite channel to report abort or timeout. It also means when an read or
write error is reported on a side, we no longer update the other side. Thus
a read error on the server side does no long lead to a write error on the
client side. This should ease errors report.
include/haproxy/channel-t.h
include/haproxy/sc_strm.h
src/backend.c
src/cli.c
src/filters.c
src/http_ana.c
src/stconn.c
src/stream.c
src/tcp_rules.c