-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
connection limits not respected after call to curl_easy_reset #17052
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
Comments
icing
added a commit
to icing/curl
that referenced
this issue
Apr 15, 2025
On an easy reset, the dohfor_mid must be reset to -1. refs curl#17052
Thanks for your report! Your analysis is correct. I made #17058 with the fix as you suggested. Care to verify? |
I can verify that change resolves the issue. |
nbaws
pushed a commit
to nbaws/curl
that referenced
this issue
Apr 26, 2025
On an easy reset, the dohfor_mid must be reset to -1. Reported-by: epicmkirzinger on github Fixes curl#17052 Closes curl#17058
nbaws
pushed a commit
to nbaws/curl
that referenced
this issue
Apr 26, 2025
On an easy reset, the dohfor_mid must be reset to -1. Reported-by: epicmkirzinger on github Fixes curl#17052 Closes curl#17058
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I did this
After performing an upgrade of curl, I noticed WSAEADDRINUSE errors started occurring in a program that makes requests to many servers and reuses easy handles, calling curl_easy_reset in between. It seemed like the connection limits were not being respected.
Performing a git-bisect revealed that the problem was introduced in 22d292b
Upon inspecting the change, I observed the following: dohfor_mid is initialized to -1 in Curl_open, however when curl_easy_reset is called, it ends up as 0 when the UserDefined struct in the Curl_easy is memset to 0. Once it is 0, the (data->set.dohfor_mid >= 0) condition in create_conn then becomes true, resulting in the connection limit being overridden. Changing it so that dohfor_mid is instead initialized to -1 in Curl_init_userdefined has resolved the issue for me.
I expected the following
No response
curl/libcurl version
>= curl-8.10.0
operating system
Windows 10
The text was updated successfully, but these errors were encountered: