... as there is nothing to wait for then, it just waits. Otherwise, this
causes much more CPU work and updates than necessary during ratelimit
periods.
Ref: https://curl.se/mail/lib-2023-11/0056.html
Closes #12430
case MSTATE_PERFORMING:
Curl_pollset_add_socks(data, ps, Curl_single_getsock);
break;
+
+ case MSTATE_RATELIMITING:
+ /* nothing to wait for */
+ return;
}
/* Let connection filters add/remove as needed */
* 'actual' is the time in milliseconds it took to actually download the
* last 'size' bytes.
*/
- actual = Curl_timediff(now, start);
+ actual = Curl_timediff_ceil(now, start);
if(actual < minimum) {
/* if it downloaded the data faster than the limit, make it wait the
difference */