mirror of
https://github.com/curl/curl.git
synced 2026-08-26 09:03:38 +03:00
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:
parent
3644a35027
commit
8373ca3641
2 changed files with 10 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue