]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: checks: immediately report a connection success
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Feb 2014 17:31:24 +0000 (18:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Feb 2014 17:31:24 +0000 (18:31 +0100)
commit3be293f4a3f466b71ddde639690b91979c9498a5
tree9e03a658041336d645f6775fd8faebfdf881f1d9
parent96a7785429d8dfb3c0df4fb83a08fe5600dab440
BUG/MEDIUM: checks: immediately report a connection success

When no check type is configured (so the basic connection check), we
want the connection success to be immediately reported. Unfortunately,
it did not happen because in this case the connection is not registered
for read nor for write, and the wake_srv() callback does not handle this
case where no data transfer was requested. However, having option tcp-check
hides this problem because the check type follows a different setup mode,
by having check->type != 0 and the connection believing it must try to
send data.

The effect was that without any option, checks would succeed only at the
end of the check interval. So let's just add the wake-up condition.

This bug appeared with the recent polling changes, no backport is needed.
As a workaround, using "option tcp-check" fixes the problem.
src/checks.c