Skip to content

ngtcp2: stabilize recv - #20220

Closed
icing wants to merge 2 commits into
curl:masterfrom
icing:ngtcp2-recv-stabilize
Closed

ngtcp2: stabilize recv#20220
icing wants to merge 2 commits into
curl:masterfrom
icing:ngtcp2-recv-stabilize

Conversation

@icing

@icing icing commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

When receiving on a stream that already failed or has already been closed, return the matching error code without touching the connection. In case the connection shows errors, e.g. the server closed, those errors should not have impact on an already failed/closed stream.

This might mitigate flakiness in pytest 07_13 where unexpected errors occur after a successful upload.

When receiving on a stream that already failed or has already been closed,
return the matching error code without touching the connection. In case
the connection shows errors, e.g. the server closed, those errors should
not have impact on an already failed/closed stream.

This might mitigate flakiness in pytest 07_13 where unexpected errors
occur after a successful upload.
@icing icing added the HTTP/3 h3 or quic related label Jan 8, 2026
@icing
icing requested a review from vszakats January 8, 2026 10:51
@bagder

bagder commented Jan 8, 2026

Copy link
Copy Markdown
Member

augment review

@augmentcode

augmentcode Bot commented Jan 8, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Stabilizes HTTP/3 recv handling for the ngtcp2 backend by preferring already-known per-stream outcomes over later connection-level errors.

Changes:

  • Updates cf_ngtcp2_recv() to first check stream->xfer_result / stream->closed and return the matching error/status immediately.
  • Processes ingress once via cf_progress_ingress() only when the stream is still active, then re-checks xfer_result/closed afterward.
  • Leaves the normal “no data yet” behavior unchanged by returning CURLE_AGAIN when the stream remains open.

Technical Notes: Intended to mitigate flakiness (e.g. pytest 07_13) where late connection errors after a successful upload could incorrectly affect an already failed/closed stream.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@bagder bagder closed this in f2d0088 Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTTP/3 h3 or quic related

Development

Successfully merging this pull request may close these issues.

2 participants