-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Replace WebClient usage with HttpClient #6388
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
Conversation
| new WebClient().DownloadFile(url, relativeFilePath); | ||
| using (var client = new HttpClient()) | ||
| { | ||
| var response = await client.GetAsync(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe? I copied this from elsewhere in the repo which doesn’t dispose. Perhaps disposing the wrapping client takes care of any open resources. I will look into it and follow up with all the instances of the problem in the repo if necessary.
https://github.com/dotnet/machinelearning/search?q=httpclient+getasync&type=
|
Unix failure is System.Drawing: |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6388 +/- ##
=======================================
Coverage 68.50% 68.50%
=======================================
Files 1165 1165
Lines 246202 246211 +9
Branches 25744 25744
=======================================
+ Hits 168651 168667 +16
+ Misses 70866 70860 -6
+ Partials 6685 6684 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Definitely broke Linux, it’s hanging. Will see what I did wrong. Don’t merge please. |
|
Could be |
b5bd6f7 to
f7ce04e
Compare
|
Can’t await unless I change the whole stack. ConfigureAwait is the solution. |
This reverts commit 60db8e8.
This reverts commit 60db8e8.
#6385 and #6367 clashed after merge. Fix the build break.