Skip to content

fix: conns that received GOAWAY during checkout are added to the pool - #122

Merged
quettabit merged 1 commit into
mainfrom
qb/106
Sep 10, 2026
Merged

quettabit merged 1 commit into
mainfrom
qb/106

Conversation

@quettabit

Copy link
Copy Markdown
Member

closes #106

@quettabit
quettabit requested a review from a team as a code owner September 10, 2026 21:23
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR prevents a connection that received HTTP/2 GOAWAY during setup from entering the connection pool.

  • Closes the affected connection and reports a connection-level error before reserving a request stream.
  • Clarifies setup failure messages and consistently classifies zero initial stream capacity as a connection error.
  • Updates the client test fixture and zero-capacity assertion for the revised behavior.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable correctness, security, or repository-rule violations identified.

The new guard closes and rejects a GOAWAY-marked connection before it is pooled or assigned a stream, while the accompanying exception changes preserve the relevant internal retry semantics.

Important Files Changed

Filename Overview
src/s2_sdk/_client.py Adds a pre-pooling GOAWAY guard and refines connection-establishment errors without introducing a confirmed behavioral regression.
tests/test_client.py Extends mocked connections with GOAWAY state and updates the zero-capacity exception expectation.

Reviews (1): Last reviewed commit: "initial commit" | Re-trigger Greptile

@quettabit quettabit changed the title fix: conns that received GOAWAY are added to the pool fix: conns that received GOAWAY during checkout are added to the pool Sep 10, 2026
@quettabit
quettabit merged commit ef430fc into main Sep 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.

[Detail Bug] HTTP/2: Connections that already received GOAWAY are added to the pool, causing opaque h2 errors on first request

1 participant