Skip to content
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

make Curl_getconnectinfo work with connection cache from share handle #8524


Copy link

I experienced that curl_easy_getinfo() with CURLINFO_ACTIVESOCKET does not return a socket, if I use a easy_handle with a share_handle set (curl_easy_setopt() with CURLOPT_SHARE).
The reason is that in the curl function Curl_getconnectinfo() does not check if the connection cache from the share_handle was used.
I propose the following pull request to address this issue.

BTW: A long time ago [1], I also proposed a patch in the same function to not only retrieve the last used connection of an easy_handle but also the currently active connection. If the above PR is acceptable I could also create a PR with this extended behavior. We use this for years now ;-).


@meierfra-ergon meierfra-ergon force-pushed the Curl_getconnectinfo_with_share_handle branch from d3272ac to 9644020 Compare February 28, 2022 14:38
Copy link

bagder commented Mar 8, 2022


@bagder bagder closed this in 1b169d5 Mar 8, 2022

This comment was marked as off-topic.


This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants