Repository navigation
perf: reuse HTTP client transport instead of cloning it - #1095
Merged
Merged
Conversation
makeLogClient() was creating a new http.Client with a cloned transport, which gave it a separate connection pool. This meant TCP+TLS connections were never reused between update cycles. Now wraps the original client's transport with the logging round tripper directly, preserving the connection pool and keep-alive behavior. Fixes #1094 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 of 4 tasks
qdm12
approved these changes
Apr 10, 2026
qdm12
left a comment
Owner
There was a problem hiding this comment.
Sure, I'm not sure why the transport was clone anyway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
makeLogClient()was creating a newhttp.Clientwithtransport.Clone(), giving it a separate connection poolloggingRoundTripperdirectly, preserving the connection pool and keep-alive behaviorFixes #1094
Test plan
go build ./...compiles cleanlygo test ./...— all tests pass includingTest_LogClient🤖 Generated with Claude Code