Files
dotnet-runtime/src/libraries/System.Net.Http
Stephen Toub 4c75f5d1cd Add response drain max time to SocketsHttpHandler (dotnet/corefx#27708)
* Add response drain max time to SocketsHttpHandler

Adds support for a max time limit on how long we'll try to drain a connection before returning it to the pool, and adds a (currently non-public) knob for controlling that limit.

This also fixes a race condition with regards to cancellation and chunked responses.  If cancellation was requested after returning the connection to the pool but before we disposed of the cancellation registration, someone else could get the pooled connection and then cancellation of one request could end up canceling the other request.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/4ca662cf7ed1bff8e423839936083838d705008d
2018-03-06 07:38:06 -05:00
..
2017-08-29 08:46:22 -07:00
2017-05-19 10:17:08 -07:00