From 4732ca5724072f132876f520c8f02c7c5b654d95 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Jun 2016 14:56:02 +0200 Subject: CURLOPT_TCP_NODELAY: now enabled by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a few wasted hours hunting down the reason for slowness during a TLS handshake that turned out to be because of TCP_NODELAY not being set, I think we have enough motivation to toggle the default for this option. We now enable TCP_NODELAY by default and allow applications to switch it off. This also makes --tcp-nodelay unnecessary, but --no-tcp-nodelay can be used to disable it. Thanks-to: Tim Rühsen Bug: https://curl.haxx.se/mail/lib-2016-06/0143.html --- src/tool_operate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tool_operate.c') diff --git a/src/tool_operate.c b/src/tool_operate.c index 2b53c9a85..97bb87b3d 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -792,8 +792,8 @@ static CURLcode operate_do(struct GlobalConfig *global, set_binmode(stdout); } - if(config->tcp_nodelay) - my_setopt(curl, CURLOPT_TCP_NODELAY, 1L); + if(!config->tcp_nodelay) + my_setopt(curl, CURLOPT_TCP_NODELAY, 0L); if(config->tcp_fastopen) my_setopt(curl, CURLOPT_TCP_FASTOPEN, 1L); -- cgit v1.2.3