]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: raw-sock: always check for CO_FL_SOCK_WR_SH before sending
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 17:17:55 +0000 (18:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 18:01:37 +0000 (19:01 +0100)
commita8c7e8e3a8994770ceeea239b62ca3d7bf7aa641
tree0c0029010649d1137c8659ad9616e43cab241721
parent49139cb9149c36ab7e5e13c2e3048d6590e3bca3
MINOR: raw-sock: always check for CO_FL_SOCK_WR_SH before sending

The test was added before splice() and send() to make sure we never
accidently send after a shutdown, because upper layers do not all
check and it's not their job to do it. In such a case we also set
errno to EPIPE so that the error can be accurately reported, e.g.,
in health checks.
src/raw_sock.c