From: Gergely Nagy Date: Sun, 17 Nov 2019 20:33:54 +0000 (+0100) Subject: multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds X-Git-Tag: curl-7_68_0~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1476aa11e26019bc47cb8a3c7cd3445ac051283;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/multi.c b/lib/multi.c index a0de107f0e..9faad0e2e5 100755 --- a/lib/multi.c +++ b/lib/multi.c @@ -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 {