]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: mark the check as stopped after a connect error
authorWilly Tarreau <w@1wt.eu>
Fri, 23 Nov 2012 07:51:32 +0000 (08:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Nov 2012 08:03:29 +0000 (09:03 +0100)
commit6b0a8505035a8df7587c7867b75c0bd4a55eae1f
tree7188f35e28c73494ff6ef2b44c3ff92825d7dc45
parentad15d127a7dd013e2d1b1966db211235e78aab42
BUG/MEDIUM: checks: mark the check as stopped after a connect error

Health checks currently still use the connection's fd to know whether
a check is running (this needs to change). When a health check
immediately fails during connect() because of a lack of local resource
(eg: port), we failed to unset the fd, so each time the process_chk
woken up after such an error, it believed a check was still running
and used to close the fd again instead of starting a new check. This
could result in other connections being closed because they were
assigned the same fd value.

The bug is only marked medium because when this happens, the system
is already in a bad state.

A comment was added above tcp_connect_server() to clarify that the
fd is *not* valid on error.
src/checks.c
src/proto_tcp.c