curl / Mailing Lists / curl-library / Single Mail


hang between connect and request sending with 7.55.1

From: Frank Meier via curl-library <>
Date: Fri, 25 Aug 2017 15:46:16 +0200


I found a behaviour change in my software after upgrading from curl
7.54.1 to 7.55.1. I'm using the libcurl multi-interface to conduct HTTP
requests. Now my client always waits 200ms after the TCP handshake is
established, before sending the HTTP request.

I could reproduce the issue with a simpler test programm, from there I
userd 'git bisect' to deduce, that the behavior change was introduced by
commit [1].

With further debugging I found out, that curl_multi_fdset() does set
max_fd to -1 and curl_multi_timeout() gives ~200ms so my code waits for
this time before calling curl_multi_perform again. When I analysed the
state transitions with the debug function (curl compiled with
--enable-debug), I see the older libcurl (before [1]) did a transition
"SENDPROTOCONNECT => DO" whereas the newer one [1] does
state is "PROTOCONNECT" I don't get a filedescriptor (max_fd = -1) with

I read in the manual, that it is possible for curl_multi_fdset() to
return -1 for max_fd when "libcurl currently does something that isn't
possible for your application to monitor", but I think that shouldn't be
the case.

Cheers, Frank


Frank Meier
Senior Software Engineer

--, Phone: +41 44 268 87 35
Ergon Informatik AG, Merkurstrasse 43, CH-8032 Z├╝rich
e r g o n smart people - smart software
Received on 2017-08-25