Skip to content

Commit 4ef2627

Browse files
committed
GH-1873 - use HttpClient instead of WebRequest, not disposing the httpclient
1 parent ee51b8c commit 4ef2627

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitVersionCore/BuildServers/AppVeyor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public override string GenerateSetVersionMessage(VersionVariables variables)
3636

3737
public override string[] GenerateSetParameterMessage(string name, string value)
3838
{
39-
using var httpClient = GetHttpClient();
39+
var httpClient = GetHttpClient();
4040

4141
var body = new
4242
{
@@ -56,7 +56,7 @@ public override string[] GenerateSetParameterMessage(string name, string value)
5656
private HttpClient GetHttpClient()
5757
{
5858
var headerValue = new MediaTypeWithQualityHeaderValue("application/json");
59-
using var httpClient = new HttpClient
59+
var httpClient = new HttpClient
6060
{
6161
BaseAddress = new Uri(Environment.GetEnvironmentVariable("APPVEYOR_API_URL"))
6262
};

0 commit comments

Comments
 (0)