Skip to content

Commit

Permalink
Prevent custom message handler disposal
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobjmarks committed Jul 28, 2023
1 parent 78930ee commit 963cd7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task<bool> UntilAsync(IContainer container)
return false;
}

using (var httpClient = new HttpClient(_httpMessageHandler ?? new HttpClientHandler()))
using (var httpClient = new HttpClient(_httpMessageHandler ?? new HttpClientHandler(), disposeHandler: _httpMessageHandler == null))
{
using (var httpRequestMessage = new HttpRequestMessage(_httpMethod, new UriBuilder(_schemeName, host, port, _pathValue).Uri))
{
Expand Down

0 comments on commit 963cd7f

Please sign in to comment.