Skip to content

fix(client): isolate timeout overrides from shared HTTP clients - #44

Merged
karlwaldman merged 1 commit into
OilpriceAPI:mainfrom
kadir2848:codex/issue-38
Sep 13, 2026
Merged

karlwaldman merged 1 commit into
OilpriceAPI:mainfrom
kadir2848:codex/issue-38

Conversation

@kadir2848

Copy link
Copy Markdown
Contributor

Fixes #38.

Apply explicit timeouts after constructor options using a shallow HTTP client copy. This avoids mutating shared clients and makes option order independent, including zero and negative timeouts.

Regression tests fail on the base revision with shared-state changes and a data race, and pass with this change.

Validation:

  • go test -json -race ./... (294 test/subtest passes)
  • go vet ./...
  • go build ./...
  • gofmt -l client.go client_timeout_test.go
  • scripts/clean-install-smoke.sh (local fixtures; lab-local temporary directory)

No live API tests were run. Prepared with Codex assistance.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: a5b0285a-9830-484a-a950-aaadf0bb3502


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@karlwaldman
karlwaldman merged commit c158ed5 into OilpriceAPI:main Sep 13, 2026
1 check 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.

[P2] WithTimeout mutates a caller-supplied *http.Client — confirmed data race under -race

2 participants