]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: implement cs_drain_and_close()
authorWilly Tarreau <w@1wt.eu>
Fri, 11 Dec 2020 10:04:51 +0000 (11:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Dec 2020 10:04:51 +0000 (11:04 +0100)
commit6aee5b9a4c39b24b8afdf8d3473f0356d8e65e59
tree720501c8105fa0589efb664e02035f3f5a0a1984
parenta5ea7519222282d5a5abd107ff4bdfee90b54fae
MINOR: connection: implement cs_drain_and_close()

We had cs_close() which forces a CS_SHR_RESET mode on the read side,
and due to this there are a few call places in the checks which
perform a manual call to conn_sock_drain() before calling cs_close().
This is absurd by principle, and it can be counter-productive in the
case of a mux where this could even cause the opposite of the desired
effect by deleting pending frames on the socket before closing.

Let's add cs_drain_and_close() which uses the CS_SHR_DRAIN mode to
prepare this.
include/haproxy/connection.h