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

Init Curl at netkan.exe and ckan.exe startup #3107

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Jul 9, 2020

Problem

image

Cause

Curl.CreateEasy requires that Curl.Init() be called; if it hasn't been, it will be at that point. Supposedly Curl.Init() isn't thread-safe, so CreateEasy will print a warning about this since it can't guarantee that it's not being executed in some complicated threading scenario.

Netkan falls afoul of this by not calling Curl.Init() till it's needed.

Changes

Now we init Curl at netkan and ckan startup, which isn't in a complicated threading scenario, so the message won't appear anymore.

Fixes #1441.

@HebaruSan HebaruSan added Bug Something is not working as intended Pull request Netkan Issues affecting the netkan data labels Jul 9, 2020
@HebaruSan HebaruSan requested a review from techman83 July 9, 2020 20:56
@HebaruSan HebaruSan changed the title Init Curl at netkan startup Init Curl at netkan.exe and ckan.exe startup Jul 9, 2020
@techman83
Copy link
Member

Ok, this has bugged me for 5 years! Thanks for fixing it!!! 🎉

@techman83 techman83 merged commit c90a20d into KSP-CKAN:master Jul 10, 2020
@HebaruSan HebaruSan deleted the fix/nk-curl branch July 10, 2020 02:36
This was referenced Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NetKAN generates Curl Warning
2 participants