MINOR: connection: remove checks for CO_FL_HANDSHAKE before I/O

There are still leftovers from the pre-xprt_handshake era with lots
of places where I/O callbacks refrain from receiving/sending if they
see that a handshake is present. This needlessly duplicates the
subscribe calls as it will automatically be done by the underlying
xprt_handshake code when attempting the operation.

The only reason for still checking CO_FL_HANDSHAKE is when we decide
to instantiate xprt_handshake. This patch removes all other ones.
This commit is contained in:
Willy Tarreau 2020-01-23 17:30:42 +01:00
parent 911db9bd29
commit 6d015724ec
2 changed files with 0 additions and 14 deletions

View File

@ -760,12 +760,6 @@ static void __event_srv_chk_w(struct conn_stream *cs)
if (unlikely(check->result == CHK_RES_FAILED))
goto out_wakeup;
if (conn->flags & CO_FL_HANDSHAKE) {
if (!(conn->flags & CO_FL_ERROR))
cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
goto out;
}
if (retrieve_errno_from_socket(conn)) {
chk_report_conn_err(check, errno, 0);
goto out_wakeup;
@ -849,12 +843,6 @@ static void __event_srv_chk_r(struct conn_stream *cs)
if (unlikely(check->result == CHK_RES_FAILED))
goto out_wakeup;
if (conn->flags & CO_FL_HANDSHAKE) {
if (!(conn->flags & CO_FL_ERROR))
cs->conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
goto out;
}
/* wake() will take care of calling tcpcheck_main() */
if (check->type == PR_O2_TCPCHK_CHK)
goto out;

View File

@ -295,8 +295,6 @@ static size_t mux_pt_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t
{
size_t ret;
if (cs->conn->flags & CO_FL_HANDSHAKE)
return 0;
ret = cs->conn->xprt->snd_buf(cs->conn, cs->conn->xprt_ctx, buf, count, flags);
if (ret > 0)