]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: connection: remove a few synchronous calls to polling updates
authorWilly Tarreau <w@1wt.eu>
Mon, 10 Dec 2012 16:03:52 +0000 (17:03 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Dec 2012 16:03:52 +0000 (17:03 +0100)
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.

src/connection.c
src/proto_tcp.c
src/stream_interface.c

index 4bb497ef292e28ac7cbdba4ccf8693bd22771e57..519a8f9cadc036ac2939e2e54cc9943c1837c610 100644 (file)
@@ -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;
 }
index 5edeeee26d2c9d91e74ae732265e284d119328ee..72854571fd551bbf6d45d85edbedbbe9ed80b1e5 100644 (file)
@@ -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;
 }
 
index 9679e169027de13439ad18d4549c4161a7d0c06e..1507dcc84f88650b247d9f154a84b72e11d9eb3b 100644 (file)
@@ -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;
                }