Description
If ProcessIncommingFrames
encounters an exception it tries to abort the HTTP 2 connection: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs#L394. This will remove it from the connection pool. But if this happens synchronously from SetupAsync
, the connection is not yet in the pool and still gets added: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs#L642-L644.
As a result, any subsequent requests will end up in an infinite loop in SendWithRetryAsync
since isNewConnection
will be false
: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs#L913