From: Willy Tarreau Date: Wed, 25 Oct 2017 08:28:45 +0000 (+0200) Subject: MINOR: connection: move the cleanup of flag CO_FL_WAIT_ROOM X-Git-Tag: v1.8-rc1~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc97cc4fd14972d68e20f6b6031c30b872aeb8e6;p=thirdparty%2Fhaproxy.git MINOR: connection: move the cleanup of flag CO_FL_WAIT_ROOM This flag is only used when reading using splicing for now, and is only set when a pipe full condition is met, so we can simplify its reset condition in conn_refresh_polling_flags so that it's cleared at the same time as the other ones, only when the control layer is ready. This flag could be used more, to mark that a buffer full condition was met with any receive method in order to simplify polling management. This should probably be revisited after 1.8. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index 3fcba26577..1cc216929f 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -171,11 +171,10 @@ void conn_update_xprt_polling(struct connection *c); */ static inline void conn_refresh_polling_flags(struct connection *conn) { - conn->flags &= ~CO_FL_WAIT_ROOM; - if (conn_ctrl_ready(conn)) { - unsigned int flags = conn->flags & ~(CO_FL_CURR_RD_ENA | CO_FL_CURR_WR_ENA); + unsigned int flags = conn->flags; + flags &= ~(CO_FL_CURR_RD_ENA | CO_FL_CURR_WR_ENA | CO_FL_WAIT_ROOM); if (fd_recv_active(conn->handle.fd)) flags |= CO_FL_CURR_RD_ENA; if (fd_send_active(conn->handle.fd))