Skip to content

fix: retry on GOAWAY errors when using cached HTTP/2 connections#3

Merged
bertold merged 1 commit into
bertold:masterfrom
0xuLiang:fix-goaway-retry
May 10, 2026
Merged

fix: retry on GOAWAY errors when using cached HTTP/2 connections#3
bertold merged 1 commit into
bertold:masterfrom
0xuLiang:fix-goaway-retry

Conversation

@0xuLiang
Copy link
Copy Markdown

RoundTripOnlyCachedConn bypasses the retry loop in RoundTripOpt, so GOAWAY and other retryable errors were returned directly to callers.

Now we check CanRetryError before returning, allowing retryable errors to fall through and create a new connection.

Changes:

  • Export canRetryError as CanRetryError
  • Check CanRetryError in roundTrip when RoundTripOnlyCachedConn fails

Fixes imroc#376

RoundTripOnlyCachedConn bypasses the retry loop in RoundTripOpt, so
GOAWAY and other retryable errors were returned directly to callers.

Now we check CanRetryError before returning, allowing retryable errors
to fall through and create a new connection.

Changes:
- Export canRetryError as CanRetryError
- Check CanRetryError in roundTrip when RoundTripOnlyCachedConn fails
@bertold bertold merged commit 52e079e into bertold:master May 10, 2026
7 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.

使用 HTTP/2 时经常触发错误

3 participants