API

SocketsHttpHandler.PooledConnectionLifetime

Limits pooled connection age for reuse; choose based on DNS and service behavior.

Formal Syntax & Structure

csharp syntaxcsharp
handler.PooledConnectionLifetime = TimeSpan.FromMinutes(2)

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.handler.PooledConnectionLifetime = TimeSpan.FromMinutes(2)
C# & .NET Reference