]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: Only attempt to do handshakes if the connection is ready.
authorOlivier Houchard <cognet@ci0.org>
Mon, 30 Dec 2019 14:13:42 +0000 (15:13 +0100)
committerOlivier Houchard <cognet@ci0.org>
Mon, 30 Dec 2019 14:18:16 +0000 (15:18 +0100)
commit37d7897aafc412f3c4a4a68a1dccbd6b5d6cb180
tree4f6975d7fbd671b492179e9a6fd4813c9cd9fd5b
parenteaf05be0ee2fc9b971132c268bafe5c5fda23fd5
BUG/MEDIUM: checks: Only attempt to do handshakes if the connection is ready.

When creating a new check connection, only attempt to add an handshake
connection if the connection has fully been initialized. It can not be the
case if a DNS resolution is still pending, and thus we don't yet have the
address for the server, as the handshake code assumes the connection is fully
initialized and would otherwise crash.
This is not ideal, the check shouldn't probably run until we have an address,
as it leads to check failures with "Socket error".
While I'm there, also add an xprt handshake if we're using socks4, otherwise
checks wouldn't be able to use socks4 properly.
This should fix github issue #430

This should be backported to 2.0 and 2.1.
src/checks.c