]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: connection: only call tcp_connect_probe when nothing was attempted yet
authorWilly Tarreau <w@1wt.eu>
Sat, 1 Sep 2012 15:59:22 +0000 (17:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Sep 2012 18:47:35 +0000 (20:47 +0200)
commitf8deb0cfa8126e6132f6ff033f785e13da607e8a
tree5b2c28b7ec2d8e854435733778d25e15756c643f
parente9dfa79a756bad119fe610844b027167165451ef
MEDIUM: connection: only call tcp_connect_probe when nothing was attempted yet

It was observed that after a failed send() on EAGAIN, a second connect()
would still be attempted in tcp_connect_probe() because there was no way
to know that a send() had failed.

By checking the WANT_WR status flag, we know if a previous write attempt
failed on EAGAIN, so we don't try to connect again if we know this has
already failed.

With this simple change, the second connect() has disappeared.
src/connection.c