Definition at line 412 of file HttpConnectionPool.cs.
413 {
415 while (true)
416 {
419 {
423 {
427 }
430 }
431 break;
434 {
436 {
437 httpConnection.Trace(
"Found expired HTTP/1.1 connection in pool.",
"GetHttp11ConnectionAsync");
438 }
440 continue;
441 }
443 {
445 {
446 httpConnection.Trace(
"Found invalid HTTP/1.1 connection in pool.",
"GetHttp11ConnectionAsync");
447 }
449 continue;
450 }
452 {
453 httpConnection.Trace(
"Found usable HTTP/1.1 connection in pool.",
"GetHttp11ConnectionAsync");
454 }
456 }
458 {
459 Trace(
"No available HTTP/1.1 connections; request queued.",
"GetHttp11ConnectionAsync");
460 }
462 try
463 {
465 }
466 finally
467 {
468 if (HttpTelemetry.Log.IsEnabled())
469 {
470 HttpTelemetry.Log.Http11RequestLeftQueue(
stopwatch.GetElapsedTime().TotalMilliseconds);
471 }
472 }
473 }
bool CheckExpirationOnGet(HttpConnectionBase connection)
readonly List< HttpConnection > _availableHttp11Connections
void Trace(string message, [CallerMemberName] string memberName=null)
RequestQueue< HttpConnection > _http11RequestQueue
bool _usedSinceLastCleanup
void CheckForHttp11ConnectionInjection()
static readonly System.Net.NetEventSource Log
static Microsoft.Extensions.Internal.ValueStopwatch StartNew()
References System.Net.Http.HttpConnectionPool._availableHttp11Connections, System.Net.Http.HttpConnectionPool._http11RequestQueue, System.Net.Http.HttpConnectionPool._usedSinceLastCleanup, System.cancellationToken, System.Net.Http.HttpConnectionPool.CheckExpirationOnGet(), System.Net.Http.HttpConnectionPool.CheckForHttp11ConnectionInjection(), System.count, System.Collections.Generic.Dictionary< TKey, TValue >.Count, 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().