fix(s2n-quic-dc): send connection close frames with pruned streams #2831
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
This change implements notifications on streams being dropped in the accept queue. The current implementation does not send anything when this happens and the client times out.
The other thing I noticed while implementing this change is that the flow window negotiated to the client is very large, meaning while the recv worker is processing packets while it's waiting in the accept queue it's also increasing the flow window. If the stream never gets accepted by the application then this is wasted work. As part of this change, I've clamped the initial window to 10x the MTU by default, with a configurable separate limit on the server builder. Once the server accepts the stream, it's able to increase the window to the larger value and notify the client.
Testing:
I've implemented a test harness showing all of these changes working, both with small and large streams.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.