Skip to content

Preserve GOAWAY errors (hyperium/hyper#4268) - #1005

Merged
seanmonstar merged 1 commit into
hyperium:masterfrom
shuvroroy:fix/preserve-received-goaway
Nov 17, 2026
Merged

seanmonstar merged 1 commit into
hyperium:masterfrom
shuvroroy:fix/preserve-received-goaway

Conversation

@shuvroroy

@shuvroroy shuvroroy commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Refs hyperium/hyper#4268.

A socket error can replace an already-parsed, nonzero GOAWAY reason after all streams have finished or been rejected. Preserve the remote reason and debug data across read, pending-write flush, and socket shutdown failures when no active streams remain. Keep existing I/O error behavior for active streams, absent GOAWAY frames, and NO_ERROR GOAWAY frames.

This fixes error precedence after GOAWAY is parsed. It cannot recover the code when the connection fails before the frame is parsed; the immediate-close TCP reproduction can still return an I/O error in that case.

A transport failure can replace an already-received GOAWAY error after
all streams have closed or been rejected by the peer.

Prefer the remote reason and debug data for read, pending-write flush,
and shutdown failures when no active streams remain. Preserve transport
errors for active streams and when no nonzero GOAWAY was received.

Validated with nine focused regression tests, the crate unit/doc tests,
the full integration suite, Clippy, formatting, and controlled
reproductions through Hyper.

Refs hyperium/hyper#4268.
@shuvroroy
shuvroroy marked this pull request as ready for review November 14, 2026 06:58

@seanmonstar seanmonstar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@seanmonstar
seanmonstar merged commit 887730f into hyperium:master Nov 17, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants