-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl_multi_wait can set *numfds to -1 #707
Comments
I don't think we should allow it to return -1... To me, it seems like the only circumstance it does this is when |
Here's what I have in mind. That first if() is already clearly wrong:
|
That is what I'm unclear about, is the user supposed to do anything about that error, or would it be better to just perform and then does perform realize that happened and kick back a recv error for the handle. In any case we can't do i < 0 because i is unsigned there, so it would have to be (int)i which is implementation defined but I know is ok for certain compilers like gcc and msvc (and I know I've seen unsigned to signed of the same width elsewhere in the code so I guess it is pretty well defined in most other compilers when twos complement to do that). Or if not we use a separate |
I don't see what a user could do about such an error in this case so I don't think we do anyone any favors by returning -1 there. The
|
.. because curl_multi_wait can no longer signal poll failure. follow-up to 77e1726 Bug: #707
LGTM, I followed up in c574434 and removed the poll failure check in easy_transfer. |
I notice in the curl tool
easy_transfer
there is a check to see ifcurl_multi_wait
set *numfds param to -1, however this is not mentioned in the documentation and in the user example there is no check. If a user had multiple handles and *numfds returned -1 would subsequent calls also return -1, and regardless I think this should be documented.The text was updated successfully, but these errors were encountered: