Skip to content

Conversation

@wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Oct 8, 2024

Don't complete the PipeWriter when it still might be used by Application code.

This pull request addresses a bug in the HTTP/3 implementation related to memory management and pipe completion.

Don't complete the `PipeWriter` when it still might be used by Application code.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix

#### PR Summary
This pull request addresses a bug in the HTTP/3 implementation related to memory management and pipe completion.
- `Http3RequestTests.cs`: Added a new test to ensure memory is preserved when the connection closes.
- `Http3OutputProducer.cs`: Refactored `Dispose` method and added `Complete` method to properly handle pipe completion.
- `DiagnosticMemoryPool.cs`: Added `ContainsMemory` method to check if memory is still rented from the pool.
- `Http3Stream.cs`: Ensured `Complete` is called on `_http3Output` when the stream is closed.
- `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj`: Added `InternalsVisibleTo` for `Interop.FunctionalTests`.
@ghost ghost added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Oct 8, 2024
@wtgodbe wtgodbe enabled auto-merge (squash) October 8, 2024 17:26
@wtgodbe wtgodbe merged commit 1b5bf94 into main Oct 8, 2024
27 checks passed
@wtgodbe wtgodbe deleted the wtgodbe/PortRc2Mai branch October 8, 2024 19:24
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Oct 8, 2024
captainsafia pushed a commit that referenced this pull request Dec 31, 2024
Don't complete the `PipeWriter` when it still might be used by Application code.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix

#### PR Summary
This pull request addresses a bug in the HTTP/3 implementation related to memory management and pipe completion.
- `Http3RequestTests.cs`: Added a new test to ensure memory is preserved when the connection closes.
- `Http3OutputProducer.cs`: Refactored `Dispose` method and added `Complete` method to properly handle pipe completion.
- `DiagnosticMemoryPool.cs`: Added `ContainsMemory` method to check if memory is still rented from the pool.
- `Http3Stream.cs`: Ensured `Complete` is called on `_http3Output` when the stream is closed.
- `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj`: Added `InternalsVisibleTo` for `Interop.FunctionalTests`.

Co-authored-by: Brennan Conroy <[email protected]>
captainsafia pushed a commit that referenced this pull request Feb 11, 2025
Don't complete the `PipeWriter` when it still might be used by Application code.

----
#### AI description  (iteration 1)
#### PR Classification
Bug fix

#### PR Summary
This pull request addresses a bug in the HTTP/3 implementation related to memory management and pipe completion.
- `Http3RequestTests.cs`: Added a new test to ensure memory is preserved when the connection closes.
- `Http3OutputProducer.cs`: Refactored `Dispose` method and added `Complete` method to properly handle pipe completion.
- `DiagnosticMemoryPool.cs`: Added `ContainsMemory` method to check if memory is still rented from the pool.
- `Http3Stream.cs`: Ensured `Complete` is called on `_http3Output` when the stream is closed.
- `Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj`: Added `InternalsVisibleTo` for `Interop.FunctionalTests`.

Co-authored-by: Brennan Conroy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants