Add Connection{Idle}Timeouts to ManagedHandler (dotnet/corefx#26839)
authorStephen Toub <stoub@microsoft.com>
Wed, 7 Feb 2018 12:51:10 +0000 (07:51 -0500)
committerGitHub <noreply@github.com>
Wed, 7 Feb 2018 12:51:10 +0000 (07:51 -0500)
commit601553e06dd30424e261a1373391595545076666
tree9ed77e15b30023f11d5a0f96aaba33427009afbe
parent9bdbd629640a98dc15fdc702c6496d14ca927ac0
Add Connection{Idle}Timeouts to ManagedHandler (dotnet/corefx#26839)

* Add Connection{Idle}Timeouts to ManagedHandler

We can agree on the final name(s) when going through API reviews.  For now, I chose what I think are easy to understand names:
- ConnectionTimeout: how long a connection is allowed to be reused before it's no longer usable, defaults to infinite
- ConnectionIdleTimeout: how long a connection can sit idle in the pool before it's no longer usable, defaults to 2 minutes (that value was hardcoded before this change)

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/1a5cdbe1af7a5befe16bb4581f29f0af64f4a101
src/libraries/Common/src/System/Net/Http/HttpHandlerDefaults.cs
src/libraries/System.Net.Http/src/ILLinkTrim.xml
src/libraries/System.Net.Http/src/System/Net/Http/Managed/HttpConnection.cs
src/libraries/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionPool.cs
src/libraries/System.Net.Http/src/System/Net/Http/Managed/HttpConnectionSettings.cs
src/libraries/System.Net.Http/src/System/Net/Http/Managed/ManagedHandler.cs
src/libraries/System.Net.Http/tests/FunctionalTests/ManagedHandlerTest.cs