Skip to content

fix: cancel response bodies before retrying - #209

Open
abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:fix/204-cancel-retry-response-body
Open

fix: cancel response bodies before retrying#209
abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:fix/204-cancel-retry-response-body

Conversation

@abhinavkr26104

Copy link
Copy Markdown

Summary

  • release unused retryable response bodies before starting backoff
  • support Web ReadableStream bodies and Node-style async iterable bodies
  • keep bodyless retry responses working

Why

Retryable 429/5xx responses were abandoned without consuming or canceling their bodies. Streaming responses could retain sockets and reduce connection reuse across retries.

Testing

  • ./scripts/test --runInBand (21 suites, 139 tests)
  • ./scripts/build
  • tsc --noEmit
  • full ESLint run
  • Prettier check for changed files

Fixes #204

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.

Retryable responses are abandoned without canceling their bodies

1 participant