Skip to content

Commit def55f3

Browse files
fix: use timeout-bounded HTTP client for unary Read and Append (#255)
closes #234 ## Summary - Unary `Read` and `Append` were using `getHTTPClient()` which returns the streaming HTTP client (`Timeout: 0`), ignoring the configured `RequestTimeout`. - Changed both to use `s.basinClient.httpClient` (the timeout-bounded client), consistent with `CheckTail` and other unary operations. - Streaming sessions (`AppendSession`, `ReadSession`) continue to use the no-timeout streaming client via `getHTTPClient()`. ## Test plan - [ ] Verify `go build ./...` passes - [ ] Confirm unary `Read`/`Append` now respect `RequestTimeout` under network delays 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 967c763 commit def55f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

s2/append.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (s *StreamClient) Append(ctx context.Context, input *AppendInput) (*AppendA
4040
pbInput := convertAppendInputToProto(prepared)
4141

4242
httpClient := &httpClient{
43-
client: s.getHTTPClient(),
43+
client: s.basinClient.httpClient,
4444
baseURL: s.basinClient.baseURL,
4545
accessToken: s.basinClient.accessToken,
4646
logger: s.logger,

s2/read.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (s *StreamClient) Read(ctx context.Context, opts *ReadOptions) (*ReadBatch,
9797

9898
batch, err := withRetries(ctx, s.basinClient.retryConfig, s.logger, func() (*ReadBatch, error) {
9999
httpClient := &httpClient{
100-
client: s.getHTTPClient(),
100+
client: s.basinClient.httpClient,
101101
baseURL: s.basinClient.baseURL,
102102
accessToken: s.basinClient.accessToken,
103103
logger: s.logger,

0 commit comments

Comments
 (0)