I also have a small program based on (https://curl.haxx.se/libcurl/c/simple.html).
Basically I've changed the URL and added timeout control: curl_easy_setopt(curl, CURLOPT_TIMEOUT, 6L);
Or (tested both with same results): curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 6*1000);
When I run the program it raises a timeout error after 6 seconds of execution. curl_easy_perform() failed: Timeout was reached
I expected the following
Timeout should not be raised when the client receives the response before the specified timeout option.
curl/libcurl version
After some work, I've found the problem starts with this commit, merged before 7.61.0: 3ef67c6
operating system
Linux 4.18.0-2-amd64 (Debian based)
The text was updated successfully, but these errors were encountered:
curl_multi_wait() was erroneously used from within
curl_easy_perform(). It could lead to it believing there was no socket
to wait for and then instead sleep for a while instead of monitoring the
socket and then miss acting on that activity as swiftly as it should
(causing an up to 1000 ms delay).
Reported-by: Antoni Villalonga
Fixes#3305
Clodes #3306
Hi,
I did this
I have a simple URL that takes some time before reply.
For example: "http://127.0.0.1/sleep.php?sleep=5.3" will took 5.3 seconds.
I also have a small program based on (https://curl.haxx.se/libcurl/c/simple.html).
Basically I've changed the URL and added timeout control:
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 6L);
Or (tested both with same results):
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 6*1000);
When I run the program it raises a timeout error after 6 seconds of execution.
curl_easy_perform() failed: Timeout was reached
I expected the following
Timeout should not be raised when the client receives the response before the specified timeout option.
curl/libcurl version
After some work, I've found the problem starts with this commit, merged before 7.61.0:
3ef67c6
operating system
Linux 4.18.0-2-amd64 (Debian based)
The text was updated successfully, but these errors were encountered: