Skip to content

Commit

Permalink
multi: Fix curl_multi_poll wait when extra_fds && !extra_nfds
Browse files Browse the repository at this point in the history
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 curl#4610
  • Loading branch information
ngg authored and jay committed Nov 18, 2019
1 parent 1f6a186 commit d1476aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d1476aa

Please sign in to comment.