Definition at line 591 of file HttpConnectionPool.cs.
592 {
594 while (true)
595 {
598 {
601 {
602 return null;
603 }
605 if (num > 0)
606 {
609 }
612 }
613 break;
616 {
618 {
619 http2Connection.Trace(
"Found expired HTTP/2 connection in pool.",
"GetHttp2ConnectionAsync");
620 }
622 continue;
623 }
625 {
627 {
628 http2Connection.Trace(
"Found HTTP/2 connection in pool without available streams.",
"GetHttp2ConnectionAsync");
629 }
630 bool flag = false;
632 {
635 {
636 flag = true;
638 }
639 }
640 if (flag)
641 {
643 }
644 continue;
645 }
647 {
648 http2Connection.Trace(
"Found usable HTTP/2 connection in pool.",
"GetHttp2ConnectionAsync");
649 }
651 }
653 {
654 Trace(
"No available HTTP/2 connections; request queued.",
"GetHttp2ConnectionAsync");
655 }
657 try
658 {
660 }
661 finally
662 {
663 if (HttpTelemetry.Log.IsEnabled())
664 {
665 HttpTelemetry.Log.Http20RequestLeftQueue(
stopwatch.GetElapsedTime().TotalMilliseconds);
666 }
667 }
668 }
RequestQueue< Http2Connection > _http2RequestQueue
List< Http2Connection > _availableHttp2Connections
bool CheckExpirationOnGet(HttpConnectionBase connection)
void InvalidateHttp2Connection(Http2Connection connection)
void Trace(string message, [CallerMemberName] string memberName=null)
bool _usedSinceLastCleanup
void DisableHttp2Connection(Http2Connection connection)
void CheckForHttp2ConnectionInjection()
static readonly System.Net.NetEventSource Log
static Microsoft.Extensions.Internal.ValueStopwatch StartNew()
References System.Net.Http.HttpConnectionPool._availableHttp2Connections, System.Net.Http.HttpConnectionPool._http2Enabled, System.Net.Http.HttpConnectionPool._http2RequestQueue, System.Net.Http.HttpConnectionPool._usedSinceLastCleanup, System.cancellationToken, System.Net.Http.HttpConnectionPool.CheckExpirationOnGet(), System.Net.Http.HttpConnectionPool.CheckForHttp2ConnectionInjection(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Net.Http.HttpConnectionPool.DisableHttp2Connection(), System.Net.Http.HttpConnectionPool.InvalidateHttp2Connection(), System.Net.Http.HttpTelemetry.Log, System.Net.NetEventSource.Log, Microsoft.Extensions.Internal.ValueStopwatch.StartNew(), System.Net.Http.HttpConnectionPool.SyncObj, and System.Net.Http.HttpConnectionPool.Trace().
Referenced by System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync().