Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Idle time seems to count towards timeout configured in CURLOPT_TIMEOUT #3264
In my application I'm using libcurl to perform FTP requests via the easy interface. I create a handle with
I skimmed through the libcurl sources and it seems that the current timestamp is stored inside the connection handle (
This tells me that idle time counts towards the timeout which seems unintuitive to me. I don't know where
Maybe I'm using libcurl the wrong way, but I think the behavior is wrong in an application context. It might make sense for command line calls of curl but when using the library functions I would expect that
The issue can be reproduced on Linux and Windows with the latest version of libcurl.
I can confirm that this is indeed how the timeout value is set and used. The timeout is for "the entire operation" and the commands that are sent when shutting down a connection are also included in that "entire operation" - which in a case like described here is far from obvious and a bit strange.
It would probably make sense to reset the timestamp when
Whatever we decide, we should document this.