Skip to content

HttpClient: Add ConnectionLifetime option#151

Merged
kevinwell merged 1 commit intomasterfrom
httpclient/sockethandler
Oct 22, 2025
Merged

HttpClient: Add ConnectionLifetime option#151
kevinwell merged 1 commit intomasterfrom
httpclient/sockethandler

Conversation

@MrSmoke
Copy link
Member

@MrSmoke MrSmoke commented Oct 20, 2025

  • For newer versions of .NET, add ConnectionLifetime to RestClientOptions
    • Use the SocketsHttpHandler (the default anyway) so we can set the PooledConnectionLifetime option

This should mean we handle dns changes better during app lifetimes

If we are a newer version of dotnet, use the SocketsHttpHandler (the default anyway) so we can set the PooledConnectionLifetime option
@MrSmoke MrSmoke changed the title HttpClient: Add ConnectionLifetime HttpClient: Add ConnectionLifetime option Oct 20, 2025
@MrSmoke MrSmoke requested a review from kevinwell October 20, 2025 06:48
@kevinwell kevinwell merged commit 7dc0895 into master Oct 22, 2025
5 checks passed
@kevinwell kevinwell deleted the httpclient/sockethandler branch October 22, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants