curl-library
CURLOPT_MAX_RECV_SPEED_LARGE and multi_socket_action (with patch)
Date: Sun, 30 Jan 2011 10:22:19 -0800
Hello,
I've having trouble getting CURLOPT_MAX_RECV_SPEED_LARGE to work with
multi_socket_action. Downloading a large file stalls. I have observed
this behavior with both 7.21.3 and the lastest from the git repo.
I've attached a patch to hiperfifo.c that demonstrates this behavior
(hiperfifo_repro.patch) along with the output of a hiperfifo run
(hiperfifo_output_bad.txt).
It appears that multi_runsingle may be leaving sockets in
CURLM_STATE_TOOFAST for too long because it is working off of outdated
progress data. Attached is a patch that calls Curl_pgrsUpdate just
inside the TOOFAST case (multi_toofast_update_progress.patch). With
this patch, I observe a nice smooth rate-limited transfer (see
hiperfifo_output_good.txt).
Is there a better approach to fixing this?
Thanks,
Nick
- text/plain attachment: hiperfifo_output_bad.txt
- text/plain attachment: hiperfifo_output_good.txt