On Tue, 5 Dec 2023, Dmitry Karpov via curl-library wrote:
In the do-while loop, we keep reading from socket until we can, so with
relatively big socket buffers we can read a lot of data before we can have a
chance to check for throttling again
It does initialize the max_recv like this:
curl_off_t max_recv = data->set.max_recv_speed?
data->set.max_recv_speed : CURL_OFF_T_MAX;
... so it *is* limited. That might just not be a very effective limit after it
already has reached the limit. Maybe we can improve this logic?
Even just getting a smaller portion of the max speed could probably be a
better take:
curl_off_t max_recv = data->set.max_recv_speed?
data->set.max_recv_speed / 4 : CURL_OFF_T_MAX;
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html