Skip to content

Commit 903539f

Browse files
authored
As we are not re-using HttpClient it can be immediately disposed
1 parent 36fd29e commit 903539f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ServiceControl.Audit.Persistence.RavenDB/LicenseStatusCheck.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ record LicenseStatusFragment(string Id, string LicensedTo, string Status, bool E
1313

1414
public static async Task WaitForLicenseOrThrow(DatabaseConfiguration configuration, CancellationToken cancellationToken)
1515
{
16-
var client = new HttpClient() { BaseAddress = new Uri(configuration.ServerConfiguration.ConnectionString ?? configuration.ServerConfiguration.ServerUrl) };
16+
using var client = new HttpClient() { BaseAddress = new Uri(configuration.ServerConfiguration.ConnectionString ?? configuration.ServerConfiguration.ServerUrl) };
1717
var licenseCorrectlySetup = false;
1818
var attempts = 0;
1919
while (!licenseCorrectlySetup)

src/ServiceControl.Persistence.RavenDB/LicenseStatusCheck.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ record LicenseStatusFragment(string Id, string LicensedTo, string Status, bool E
1313

1414
public static async Task WaitForLicenseOrThrow(RavenPersisterSettings configuration, CancellationToken cancellationToken)
1515
{
16-
var client = new HttpClient() { BaseAddress = new Uri(configuration.ConnectionString ?? configuration.ServerUrl) };
16+
using var client = new HttpClient() { BaseAddress = new Uri(configuration.ConnectionString ?? configuration.ServerUrl) };
1717
var licenseCorrectlySetup = false;
1818
var attempts = 0;
1919
while (!licenseCorrectlySetup)

0 commit comments

Comments
 (0)