On Tue, 20 Mar 2012, Joshua Litt wrote:

curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);

rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);

When I try to integrate the example code into our codebase, the select
never succeeds(always returns -1).

Most of the times when people report this, it is because you don't check maxfd or the return code from curl_multi_fdset() and thus pass in "silly" values to select(). Like during the perioud when libcurl doesn't have any sockets to wait on...

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to