Fix NetworkInformation / execution context usage for HTTP/3 and Alt-Svc (#32621)
authorCory Nelson <phrosty@gmail.com>
Fri, 21 Feb 2020 18:00:30 +0000 (10:00 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2020 18:00:30 +0000 (10:00 -0800)
commitb2de9fa4cc59cd3cc783d3c090749cf6c43ce43a
tree01c3a5d02360296bce3e48928e9186a4a29db76f
parentf498a3171b65215ae3176598869233fee8e4da58
Fix NetworkInformation / execution context usage for HTTP/3 and Alt-Svc (#32621)

Fix: leaking NetworkAddressChangedEventHandler and related WeakReference if user does not Dispose HttpClient. Resolves #32526.
Fix: using HttpClient from within a suppressed execution context. Add test for this. Resolves #32524.
Fix: capturing excessive execution context in Alt-Svc expiration timer.
Optimization: do not monitor for network changes until a non-persistent Alt-Svc is used.
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs