Skip to content

Commit 5dccc42

Browse files
author
kalibera
committed
Adjust adding urls in simultaneous download.
git-svn-id: https://svn.r-project.org/R/trunk@87364 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 36b2f1f commit 5dccc42

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/modules/internet/libcurl.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,10 +943,13 @@ in_do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho)
943943
(below) which needs the easy handle */
944944
download_close_finished(&c); /* releases resources */
945945

946-
if (!still_running)
947-
download_add_one_url(&next_url, scmd, mode, quiet, single, &c);
946+
if (!still_running) {
947+
if (!download_add_one_url(&next_url, scmd, mode, quiet, single,
948+
&c))
949+
still_running++;
950+
}
948951

949-
download_try_add_urls(&next_url, MAX_CONCURRENT_URLS - still_running - 1,
952+
download_try_add_urls(&next_url, MAX_CONCURRENT_URLS - still_running,
950953
scmd, mode, quiet, single, &c);
951954

952955
curl_multi_perform(mhnd, &still_running);

0 commit comments

Comments
 (0)