mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-11 16:32:52 +02:00
MEDIUM: connection: add check for readiness in I/O handlers
The recv/send callbacks must check for readiness themselves instead of having their callers do it. This will strengthen the test and will also ensure we never refrain from calling a handshake handler because a direction is being polled while the other one is ready.
This commit is contained in:
@@ -400,6 +400,9 @@ int conn_si_send_proxy(struct connection *conn, unsigned int flag)
|
||||
if (!conn_ctrl_ready(conn))
|
||||
goto out_error;
|
||||
|
||||
if (!fd_send_ready(conn->t.sock.fd))
|
||||
goto out_wait;
|
||||
|
||||
/* If we have a PROXY line to send, we'll use this to validate the
|
||||
* connection, in which case the connection is validated only once
|
||||
* we've sent the whole proxy line. Otherwise we use connect().
|
||||
|
||||
Reference in New Issue
Block a user