SocketsHttpHandler.PooledConnectionIdleTimeout 屬性

定義

取得或設定集區中的連線須閒置多久時間,才會視為可重複使用。

public:
 property TimeSpan PooledConnectionIdleTimeout { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan PooledConnectionIdleTimeout { get; set; }
member this.PooledConnectionIdleTimeout : TimeSpan with get, set
Public Property PooledConnectionIdleTimeout As TimeSpan

屬性值

集區中聯機的空閒時間上限。 .NET 6 和更新版本中此屬性的預設值為 1 分鐘;預設值為 .NET Core 和 .NET 5 中的 2 分鐘

例外狀況

指定的值小於 Zero (,但) 除外 InfiniteTimeSpan

適用於