Skip to content

H2C connection to HTTP.sys on localhost causes infinite loop #42259

Closed
@ManickaP

Description

@ManickaP

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions