On Tue, 5 Dec 2023, Dmitry Karpov via curl-library wrote:
With this patch, I was able to get quite precise speed limitations (under 0.5% on average) for different socket buffers and speed limits.
Isn't this the same effect with a smaller change? --- a/lib/transfer.c +++ b/lib/transfer.c @@ -430,12 +430,11 @@ static CURLcode readwrite_data(struct Curl_easy *data, CURLcode result = CURLE_OK; char *buf; size_t blen; size_t consumed; int maxloops = 100; - curl_off_t max_recv = data->set.max_recv_speed? - data->set.max_recv_speed : CURL_OFF_T_MAX; + curl_off_t max_recv = data->set.max_recv_speed ? 0 : CURL_OFF_T_MAX; bool data_eof_handled = FALSE; DEBUGASSERT(data->state.buffer); *done = FALSE; *comeback = FALSE; -- / 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