]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds
authorGergely Nagy <ngg@tresorit.com>
Sun, 17 Nov 2019 20:33:54 +0000 (21:33 +0100)
committerJay Satiro <raysatiro@yahoo.com>
Mon, 18 Nov 2019 04:35:48 +0000 (23:35 -0500)
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

lib/multi.c

index a0de107f0e668ce130e3fae879d6f1e5e0d4829d..9faad0e2e5985c7972648224d9486c4d71c2aacc 100755 (executable)
@@ -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 {