1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 00:55:04 -05:00

multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds

Prior to this change:

The check if an extra wait is necessary was based not on the
number of extra fds but on the pointer.

If a non-null pointer was given in extra_fds, but extra_nfds
was zero, then the wait was skipped even though poll was not
called.

Closes https://github.com/curl/curl/pull/4610
This commit is contained in:
Gergely Nagy 2019-11-17 21:33:54 +01:00 committed by Jay Satiro
parent 1f6a18685e
commit d1476aa11e

View File

@ -1147,7 +1147,7 @@ static CURLMcode Curl_multi_wait(struct Curl_multi *multi,
free(ufds);
if(ret)
*ret = retcode;
if(!extrawait || extra_fds || curlfds)
if(!extrawait || nfds)
/* if any socket was checked */
;
else {