]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: unix: fix connect's polling in case no data are scheduled
authorWilly Tarreau <w@1wt.eu>
Wed, 25 Jan 2017 13:27:38 +0000 (14:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 25 Jan 2017 17:48:14 +0000 (18:48 +0100)
commit9484179f328bc7c7ae7c6c2fb404b761b256b73e
tree7e96fb5a2d5b22ed5139b83cb64132bab93bf4b8
parent819efbf4b532d718abeb5e5aa6b2521ed725fe17
BUG/MINOR: unix: fix connect's polling in case no data are scheduled

There's a test after a successful synchronous connect() consisting
in waking the data layer up asap if there's no more handshake.
Unfortunately this test is run before setting the CO_FL_SEND_PROXY
flag and before the transport layer adds its own flags, so it can
indicate a willingness to send data while it's not the case and it
will have to be handled later.

This has no visible effect except a useless call to a function in
case of health checks making use of the proxy protocol for example.

Additionally a corner case where EALREADY was returned and considered
equivalent to EISCONN was fixed so that it's considered equivalent to
EINPROGRESS given that the connection is not complete yet. But this
code should never return on the first call anyway so it's mostly a
cleanup.

This fix should be backported to 1.7 and 1.6 at least to avoid
headaches during some debugging.
src/proto_uxst.c