@@ -1417,22 +1417,11 @@ static int tls_connect(conn_t *conn, const char *host_name,
14171417 }
14181418
14191419 /* If configured, set a timer for the handshake. */
1420- if (handshake_timeout ) {
1420+ if (handshake_timeout > 0 ) {
14211421 handshake_timer_id = pr_timer_add (handshake_timeout , -1 ,
14221422 & proxy_module , handshake_timeout_cb , "SSL/TLS handshake" );
14231423 }
14241424
1425- /* Make sure that TCP_NODELAY is enabled for the handshake. */
1426- (void ) pr_inet_set_proto_nodelay (conn -> pool , conn , 1 );
1427-
1428- /* Make sure that TCP_CORK (aka TCP_NOPUSH) is DISABLED for the handshake. */
1429- if (pr_inet_set_proto_cork (conn -> wfd , 0 ) < 0 ) {
1430- pr_trace_msg (trace_channel , 9 ,
1431- "error disabling TCP_CORK on %s conn: %s" ,
1432- nstrm -> strm_type == PR_NETIO_STRM_CTRL ? "control" : "data" ,
1433- strerror (errno ));
1434- }
1435-
14361425 connect_retry :
14371426
14381427 blocking = tls_get_block (conn );
@@ -1555,17 +1544,7 @@ static int tls_connect(conn_t *conn, const char *host_name,
15551544 /* Disable the handshake timer. */
15561545 pr_timer_remove (handshake_timer_id , & proxy_module );
15571546
1558- /* Disable TCP_NODELAY, now that the handshake is done. */
1559- (void ) pr_inet_set_proto_nodelay (conn -> pool , conn , 0 );
1560-
1561- if (nstrm -> strm_type == PR_NETIO_STRM_DATA ) {
1562- /* Re-enable TCP_CORK (aka TCP_NOPUSH), now that the handshake is done. */
1563- if (pr_inet_set_proto_cork (conn -> wfd , 1 ) < 0 ) {
1564- pr_trace_msg (trace_channel , 9 ,
1565- "error re-enabling TCP_CORK on data conn: %s" , strerror (errno ));
1566- }
1567-
1568- } else if (nstrm -> strm_type == PR_NETIO_STRM_CTRL ) {
1547+ if (nstrm -> strm_type == PR_NETIO_STRM_CTRL ) {
15691548 int reused ;
15701549
15711550 /* Only try to cache the new SSL session if we actually did create a
0 commit comments