I did this
Studied the code of the example programs for CURLMOPT_TIMERFUNCTION:
These example programs don't handle timeout_ms == -1 correctly.
I expected the following
The documentation for CURLMOPT_TIMERFUNCTION says:
A timeout_ms value of -1 means you should delete your timer.
These example programs call curl_multi_socket_action() instead:
- asiohiper.cpp
- evhiperfifo.c
- multi-uv.c
These exampe programs schedule a new timer instead:
Note that the timeout value 0 also has a special meaning:
A timeout_ms value of 0 means you should call curl_multi_socket_action or curl_multi_perform (once) as soon as possible.
curl/libcurl version
7.52.1
operating system
All