From d1476aa11e26019bc47cb8a3c7cd3445ac051283 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 17 Nov 2019 21:33:54 +0100 Subject: 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 --- lib/multi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index a0de107f0..9faad0e2e 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 { -- cgit v1.2.3