]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: connection: do not check for CO_FL_SOCK_RD_SH too early
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 17:05:18 +0000 (18:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 17:05:18 +0000 (18:05 +0100)
commitd838fb840c3752630f5ddaaf8ef805b8e310f102
tree0dcedde42be27f110b8a39970222f2b5d6429c81
parent6d015724ec0179765cb1b13c4c7ef14f6dc5b2e7
MINOR: connection: do not check for CO_FL_SOCK_RD_SH too early

The handshake functions dedicated to proxy proto, netscaler and
socks4 all check for this flag before proceeding. This is wrong,
they must not do and instead perform the call to recv() then
report the close. The reason for this is that the current
construct managed to lose the CO_ER_CIP_EMPTY error code in case
the connection was already shut, thus causing a race condition
with some errors being reported correctly or as unknown depending
on the timing.
src/connection.c