fix: delegate CloseIdleConnections through userAgentRoundTripper#256
fix: delegate CloseIdleConnections through userAgentRoundTripper#256infiniteregrets merged 1 commit intomainfrom
Conversation
userAgentRoundTripper wraps the user-provided transport but did not implement CloseIdleConnections(), causing http.Client.CloseIdleConnections() to silently become a no-op after the SDK wraps the transport. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes a subtle but real bug where Confidence Score: 5/5Safe to merge — the change is minimal, correct, and follows idiomatic Go patterns for delegating optional transport methods through wrappers. Single method addition with no logic changes, no new state, and no risk of breakage. Remaining observations are P2 and do not affect correctness. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix: delegate CloseIdleConnections throu..." | Re-trigger Greptile |
closes #248
Summary
userAgentRoundTripperwraps the user-providedhttp.Client.Transportto inject User-Agent headers, but did not implementCloseIdleConnections().http.Client.CloseIdleConnections()to silently become a no-op afters2.New()wraps the transport, since the Go standard library only callsCloseIdleConnections()if the transport implements it.CloseIdleConnections()touserAgentRoundTripperthat delegates to the underlying transport when supported.Test plan
go build ./...passesCloseIdleConnections()propagates through to the underlying transport after wrapping🤖 Generated with Claude Code