curl_multi_wait: no wait if no descriptors to wait for
This is a minor change in behavior after having been pointed out by Mark Tully and discussed on the list. Initially this case would internally call poll() with no sockets and a timeout which would equal a sleep for that specified time. Bug: http://curl.haxx.se/mail/lib-2012-10/0076.html Reported by: Mark Tully
This commit is contained in:
@@ -1024,8 +1024,12 @@ CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||
++nfds;
|
||||
}
|
||||
|
||||
/* wait... */
|
||||
i = Curl_poll(ufds, nfds, timeout_ms);
|
||||
if(nfds)
|
||||
/* wait... */
|
||||
i = Curl_poll(ufds, nfds, timeout_ms);
|
||||
else
|
||||
i = 0;
|
||||
|
||||
free(ufds);
|
||||
if(ret)
|
||||
*ret = i;
|
||||
|
||||
Reference in New Issue
Block a user