Skip to content

Commit b4cee0d

Browse files
committed
Maintain sync context
1 parent 9479f7d commit b4cee0d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/HttpClientCache.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ public HttpClientCache()
3838

3939
private async ValueTask<HttpClient> InitializeHttpClient(string _, OptionsFactory factory, CancellationToken cancellationToken)
4040
{
41-
HttpClientOptions? options = await factory.Invoke(cancellationToken)
42-
.NoSync();
41+
// Maintain sync context
42+
HttpClientOptions? options = await factory.Invoke(cancellationToken);
4343

4444
HttpClient httpClient = CreateHttpClient(options);
4545

46-
await ConfigureHttpClient(httpClient, options)
47-
.NoSync();
46+
await ConfigureHttpClient(httpClient, options);
4847

4948
return httpClient;
5049
}

src/Soenneker.Utils.HttpClientCache.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@
4646
<PackageReference Include="Soenneker.Dictionaries.Singletons" Version="4.0.4" />
4747
<PackageReference Include="Soenneker.Dtos.HttpClientOptions" Version="4.0.13" />
4848
<PackageReference Include="Soenneker.Utils.Runtime" Version="4.0.912" />
49-
5049
</ItemGroup>
5150
</Project>

0 commit comments

Comments
 (0)