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.
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