-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Multiple calls to curl_multi_remove_handle with same easy handle no longer returns CURLM_OK #15844
Comments
There can certainly be opinions about this. I think failing a remove for an already removed handle is the better way. |
- Ensure that CURLM_OK is returned when curl_multi_remove_handle is called with an already removed easy handle. Prior to this change and since ba235ab which precedes 8.10.0, if curl_multi_remove_handle was called with an already-removed easy handle then the return code would be CURLM_OK or CURLM_BAD_EASY_HANDLE depending respectively on whether the multi did or did not contain other easy handles. This change restores the old behavior of returning CURLM_OK in both cases. Reported-by: seragh@users.noreply.github.com Fixes curl#15844 Closes #xxxxxx
In my opinion this is a bug. libcurl's return code for this situation varies depending on whether or not other easy handles are in the multi aka Lines 789 to 795 in 75a2079
I propose restoring the old behavior, see #15852. |
I change my mind. Removing an already removed handle should be ok. |
I did this
I have some code which calls curl_multi_remove_handle on application shutdown on an easy handle that might have already been removed on successfully doing it's work. Guess the original authors intention was to make sure curl gets shutdown cleanly irrespective.
Reproducer:
Fails with "Failed second with 2", where in the past the second invocation returned CURLM_OK;
Bisecting points to ba235ab introducing this change.
I expected the following
Strictly speaking this could be considered a regression, but maybe you want to call it a legit bug fix. Let me know what your take is so I can decide how to go about it.
curl/libcurl version
8.10+
operating system
Linux, Debian (original reporter) and Gentoo (me)
The text was updated successfully, but these errors were encountered: