When transferring 500 downloads in parallel with a c-ares enabled build only
to find that it crashed miserably, and this was due to some select()isms left in the code. This was due to API restrictions in c-ares 1.3.x, but with the upcoming c-ares 1.4.0 this is no longer the case so now libcurl runs much better with c-ares and the multi interface with > 1024 file descriptors in use.
This commit is contained in:
@@ -420,11 +420,14 @@ CURLcode curl_easy_perform(CURL *easy)
|
||||
timeout.tv_sec = 1;
|
||||
timeout.tv_usec = 0;
|
||||
|
||||
/* get file descriptors from the transfers */
|
||||
/* Old deprecated style: get file descriptors from the transfers */
|
||||
curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
|
||||
rc = Curl_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
|
||||
|
||||
/* The way is to extract the sockets and wait for them without using
|
||||
select. This whole alternative version should probably rather use the
|
||||
curl_multi_socket() approach. */
|
||||
|
||||
if(rc == -1)
|
||||
/* select error */
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user