MINOR: stream-int: stop checking for useless connection flags in chk_snd_conn

We've been keep this test for a connection being established since 1.5-dev14
when the stream-interface was still accessing the FD directly. The test on
CO_FL_HANDSHAKE and L{4,6}_CONN is totally useless here, and can even be
counter-productive on pure TCP where it could prevent a request from being
sent on a connection still attempting to complete its establishment. And it
creates an abnormal dependency between the layers that will complicate the
implementation of the mux, so let's get rid of it now.
This commit is contained in:
Willy Tarreau 2017-10-25 14:22:28 +02:00
parent 3f957b2f83
commit 3b9c850271

View File

@ -969,14 +969,12 @@ static void stream_int_chk_snd_conn(struct stream_interface *si)
conn_refresh_polling_flags(conn);
__conn_xprt_want_send(conn);
if (!(conn->flags & (CO_FL_HANDSHAKE|CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN))) {
si_conn_send(conn);
if (conn->flags & CO_FL_ERROR) {
/* Write error on the file descriptor */
__conn_xprt_stop_both(conn);
si->flags |= SI_FL_ERR;
goto out_wakeup;
}
si_conn_send(conn);
if (conn->flags & CO_FL_ERROR) {
/* Write error on the file descriptor */
__conn_xprt_stop_both(conn);
si->flags |= SI_FL_ERR;
goto out_wakeup;
}
/* OK, so now we know that some data might have been sent, and that we may