Skip to content

Commit

Permalink
fix issue where HTTP/1.1 connections were not being created asynchron…
Browse files Browse the repository at this point in the history
…ously (#56966)

* fix issue where HTTP/1.1 connections were not being created asynchronously

Co-authored-by: Geoffrey Kizer <[email protected]>
  • Loading branch information
geoffkizer and Geoffrey Kizer authored Aug 11, 2021
1 parent f9bcaa3 commit ace0f64
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private async Task AddHttp11ConnectionAsync(HttpRequestMessage request)
{
try
{
connection = await CreateHttp11ConnectionAsync(request, false, cts.Token).ConfigureAwait(false);
connection = await CreateHttp11ConnectionAsync(request, true, cts.Token).ConfigureAwait(false);
}
catch (OperationCanceledException oce) when (oce.CancellationToken == cts.Token)
{
Expand Down Expand Up @@ -596,7 +596,7 @@ private async Task HandleHttp11Downgrade(HttpRequestMessage request, Socket? soc
try
{
// Note, the same CancellationToken from the original HTTP2 connection establishment still applies here.
http11Connection = await ConstructHttp11ConnectionAsync(false, socket, stream, transportContext, request, cancellationToken).ConfigureAwait(false);
http11Connection = await ConstructHttp11ConnectionAsync(true, socket, stream, transportContext, request, cancellationToken).ConfigureAwait(false);
}
catch (OperationCanceledException oce) when (oce.CancellationToken == cancellationToken)
{
Expand All @@ -621,7 +621,7 @@ private async Task AddHttp2ConnectionAsync(HttpRequestMessage request)
{
try
{
(Socket? socket, Stream stream, TransportContext? transportContext) = await ConnectAsync(request, false, cts.Token).ConfigureAwait(false);
(Socket? socket, Stream stream, TransportContext? transportContext) = await ConnectAsync(request, true, cts.Token).ConfigureAwait(false);

if (IsSecure)
{
Expand Down

0 comments on commit ace0f64

Please sign in to comment.