mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: connection: remove a few synchronous calls to polling updates
There were a few synchronous calls to polling updates in some functions called from the connection handler. These ones are not needed and should be replaced by more efficient and more debugable asynchronous calls.
This commit is contained in:
parent
d29a06689f
commit
d486ef5045
@ -284,7 +284,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
if (errno == EAGAIN) {
|
||||
conn_sock_poll_recv(conn);
|
||||
__conn_sock_poll_recv(conn);
|
||||
return 0;
|
||||
}
|
||||
goto recv_abort;
|
||||
@ -455,7 +455,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
|
||||
goto fail;
|
||||
|
||||
fail:
|
||||
conn_sock_stop_both(conn);
|
||||
__conn_sock_stop_both(conn);
|
||||
conn->flags |= CO_FL_ERROR;
|
||||
return 0;
|
||||
}
|
||||
|
@ -520,8 +520,8 @@ int tcp_connect_probe(struct connection *conn)
|
||||
*/
|
||||
if (connect(fd, (struct sockaddr *)&conn->addr.to, get_addr_len(&conn->addr.to)) < 0) {
|
||||
if (errno == EALREADY || errno == EINPROGRESS) {
|
||||
conn_sock_stop_recv(conn);
|
||||
conn_sock_poll_send(conn);
|
||||
__conn_sock_stop_recv(conn);
|
||||
__conn_sock_poll_send(conn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ int tcp_connect_probe(struct connection *conn)
|
||||
*/
|
||||
|
||||
conn->flags |= CO_FL_ERROR;
|
||||
conn_sock_stop_both(conn);
|
||||
__conn_sock_stop_both(conn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ static void si_conn_recv_cb(struct connection *conn)
|
||||
}
|
||||
|
||||
if ((chn->flags & CF_READ_DONTWAIT) || --read_poll <= 0) {
|
||||
conn_data_stop_recv(conn);
|
||||
__conn_data_stop_recv(conn);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user